applying formats using fetch or to_frame makes all DataFrame columns objects
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 159
- Fork
- 66
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của sassoftware/python-swat
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
sassoftware/python-swat#191 · 1 bình luận ·
-
Error uploading parquet filesĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
sassoftware/python-swat#183 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
sassoftware/python-swat#180 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
sassoftware/python-swat#178 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
sassoftware/python-swat#177 · 1 bình luận ·
Tất cả issue của sassoftware/python-swat
Issue tương tự
-
follow-up needs-triage S3: minor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
manaflow-ai/cmux#36856 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation good first issue help wanted
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Shell framework build fails at "copy the shader libraries": the iOS shader libraries are now one file b-<chain>.imgCó thể đã có người làm @xiaofeng-han đã nhận hôm nay. Đang mởbuild ios
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày