Home > front end >  Generate sas7bdat files from a pandas dataframe
Generate sas7bdat files from a pandas dataframe

Time:10-17

I would like to know if there's any python library that supports this conversion, currently the options i've found are SASpy, csv or SQL database but was unsuccessful. This is not really a programming question but hope it won't be an issue. I've found this post: Export pandas dataframe to SAS sas7bdat format But was hoping to find any updates on new libraries that support sas7bdat files creation and how licensing works for SASpy.

CodePudding user response:

The sas7bdat is very hard to write. The read is fairly doable (but pretty hard) but the write is brutal. SAS costs a LOT of money and cannot be purchased (it is leased). My suggestions:

  • Use one of the products by companies that have done it. Some examples: CoyRoc (SSIS adaptor) $, StatTransfer $, SPSS $$$, SAS (lots of dollar signs). WPS might be able to do it but they save to their format to avoid the mess. They probably also support sas7bdat export.

  • Do not use sas7bdat format. Consider something else like SAS Transport format. Look at my github repository (savian-net) for C# code that can do it. Translate to Python or find a python library that can handle SAS Transport.

The sas7bdat is a binary, proprietary protocol that is 100% not published anywhere. Any docs are guesses based upon binary sleuthing. It is based on an old mainframe format and 'likely remnants' appear to be included. My suggestion is to avoid it like the plague and find an alternative.

CodePudding user response:

test hello guys test hello guys test hello guys

  • Related