Skip to content
Discussion options

You must be logged in to vote

This is a little old, but just responding in case others have the question:

The bedrock_ge.gi.ags.read.ags_to_dfs function writes an AGS3 or AGS4 to a dictionary of pandas dataframes. So, it would be relatively straight forward to write each dataframe to a csv, or a separate worksheet on an excel workbook:

dfs = ags_to_dfs(ags4)

# write to separate csv's
for name, df in dfs.items():
    df.to_csv(f'{name}.csv', index=False)

# write to worksheets in a workbook
with pd.ExcelWriter('ags_data.xlsx') as writer:
    for name, df in dfs.items():
        df.to_excel(writer, sheet_name=name, index=False)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by JoostGevaert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants