selik / xport

Python reader and writer for SAS XPORT data transport files.
MIT License
49 stars 24 forks source link

Create simple dataframe from xport.Dataset #99

Open jpgard opened 1 year ago

jpgard commented 1 year ago

Hi, thanks for the great package.

I'm seeing some performance issues when using an xport.Dataset object that I think might be addressed by converting to a straight Pandas DataFrame. Is there a method to convert an xport.Dataset to a pd.DataFrame?

selik commented 1 year ago

You're welcome. Thanks for the note.

I think you can simply pass an xport.Dataset to the pd.DataFrame constructor: df = pd.DataFrame(dataset). Does that cause an error?