TransWikia.com

Getting extra characters while loading data

Data Science Asked by Dataworld_guy on May 19, 2021

While loading data using read_sas from sas dataset in Python getting b' along with every string. How can I fix this?

One Answer

Try using endcoding=utf-8

Code:

import pandas as pd
mydf=pd.read_sas("homemypathmydataset.sas7bdat",format = 'sas7bdat', encoding="utf-8")

If the sas dataset is small, I would recommend loading from CSV file instead of sas dataset. Performance loading from SAS using Python is poor.

Answered by Bala_Science on May 19, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP