1

I've got code as follows:

asm_data=[]
asm=pd.read_sas('path_to_my_file',encoding='utf-8',chunksize=10000,iterator=True)
for chunk in asm:
    asm_data.append(asm)

the output is asm_data as list of sas7bdatreader files. How can I concat all this files in one dataframe. pd.concat doesn't work since this are sas files

1 Answer 1

2

found it :)

asm_data=[]
asm=pd.read_sas('path_to_my_file',encoding='utf-8',chunksize=10000,iterator=True)

for chunk in asm:
    asm_data.append(chunk)
asm_data_df=pd.concat(asm_data)

The point was append 'chunk' as above. My mistake.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.