Add create_pandas_dataframe option to load()#33
Open
atalha1 wants to merge 1 commit into
Open
Conversation
lets you skip building the pandas df and just get the path to the downloaded/cached csv on disk. still goes through the normal download, refresh_days, and date filtering logic, it just returns the path instead of a df when create_pandas_dataframe=False. default is True so it's fully backwards compatible. closes SimFin#25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #25.
Right now
load()always builds a pandas DataFrame after downloading the csv. This adds acreate_pandas_dataframe=Truearg, and if you set it to False it skips the parsing step and just gives you back the path to the csv on disk. You still get the download/caching/refresh_days/date-filter handling, just not forced into pandas if you don't want it.Default is True so nothing changes for anyone already using it.
Tested locally against a fake dataset file (bypassing the network download call) to check both the default DataFrame path and the create_pandas_dataframe=False path return what they should. Didn't run the full test suite since it hits the live API with a bundled key, figured that's more for CI.