Closed matiast1905 closed 1 year ago
Hey @matiast1905! Thanks for the recommendation. I've added it to my project to-do list.
In the meantime, you can try pd.json_normalize() and pass the output of scrape_shot_xy(). It should be able to convert the dicts to a dataframe. You might have to reformat the dicts a bit.
@matiast1905 this feature was added with the most recent commits and v2.6.4 on PyPI. The function now has a format
argument. The default is "json" which doesn't change how the function operates. But if you set format
to "dataframe" the function will return a Pandas DataFrame. Alternatively, if you paa save=True
and format="dataframe"
the output will be saved to a CSV, versus a JSON file if the format is "json".
@oseymour I've tested it from PyPI and It works perfect, thank you!
I'm glad it works like you want! Let me know if you need anything else!
Hi Owen, This is a really good package, works like a charm. I think it would be a nice feature to include an argument on this method to return a pandas dataframe instead of the current nested dictionaries.