applying formats using fetch or to_frame makes all DataFrame columns objects
まだ誰も着手していません。
評価
調査の方向性
Start by reproducing the behavior with tbl.to_frame(format=True) using the cars example and inspect the resulting SASDataFrame dtypes. Trace the formatting path used by to_frame or fetch, then add coverage showing that only formatted columns become objects while unformatted numeric columns retain numeric types.
索引モデルが issue の本文から書いたものです。
説明
If you have formats on only a few columns in a CAS table and try to apply the formats to the SASDataFrame, the swat package converts all columns to objects, even if the column is a simple number.
For example:
Packages
import swat
import pandas as pd
Connect to CAS
conn = ##connection info
load data to CAS
data = r'https://support.sas.com/documentation/onlinedoc/viya/exampledatasets/cars.csv'
tbl = conn.upload_file(data,
casout = {'name':'cars_upload', 'caslib':'casuser','replace':True},
importoptions={
'stripBlanks':True,
'guessRows':200,
'vars':{
'MSRP':{'format':'dollar16.'},
'Weight':{'format':'comma16.'}
}})
Only the MSRP and Weight columns have a format
tbl.columnInfo()

Pull the CAS table to the client as a SASDataFrame and apply the formats. This works as expected
df = tbl.to_frame(format=True)
df.head()

View the data types of the SASDataFrame

Everything turns into an object. It seems like only the formatted columns should be converted. Numeric columns without formats should remain numbers.
- 主要言語
- Python
- スター
- 159
- フォーク
- 66
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
sassoftware/python-swat のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
sassoftware/python-swat#191 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
sassoftware/python-swat#183 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
sassoftware/python-swat#180 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
sassoftware/python-swat#178 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
sassoftware/python-swat#177 · コメント 1 件 ·
sassoftware/python-swat の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
fritzprix/libr-agent#2612 ·
メンテナーはふだん 1 日以内に返信
-
needs-triage presubmit-gate
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
gke-labs/kube-agents#5001 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
simonw/sqlite-utils#928 ·
メンテナーはふだん 3 日以内に返信
-
colorado
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
freelawproject/juriscraper#2405 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
cline/mcp-marketplace#3576 ·