Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

list_of_data cannot be empty #1487

Closed
wants to merge 1 commit into from

Conversation

tgibson11
Copy link
Contributor

...even if the FuturesContractPrices dataframes are all empty.

Fails when trying to concatenate, and there are no DFs to concatenate.

...even if the FuturesContractPrices dataframes are all empty.

Fails when trying to concatenate, and there are no DFs to concatenate.
@tgibson11
Copy link
Contributor Author

tgibson11 commented Jan 16, 2025

I realize that the intent of the original change was to avoid a pandas FutureWarning. My initial intent here is just to stop it from failing.

Regarding the FutureWarning...

I think that should be handled where the concatenation happens. It seems reasonable to assume the dataframes being concatenated are expected to have the same columns. If so, it should be safe to do the following:

  1. Filter out any empty dataframes
  2. If the filtered list is now empty, return the first (empty) dataframe
  3. Else, do the concat with the filtered list

@bug-or-feature
Copy link
Collaborator

I've reverted that change, will come back to it

@tgibson11 tgibson11 closed this Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants