Getting extra characters while loading data
While loading data using read_sas
from sas dataset in Python getting b'
along with every string. How can I fix this?
Category Data Science
While loading data using read_sas
from sas dataset in Python getting b'
along with every string. How can I fix this?
Category Data Science
Try using endcoding=utf-8
import pandas as pd
mydf=pd.read_sas("\home\mypath\mydataset.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.
Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.