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

Updated process_report.py to avoid warnings for SettingWithCopyWarnings and FutureWarnings #40

Merged
merged 1 commit into from
May 10, 2024

Commits on May 10, 2024

  1. Patched pandas warnings for SettingWithCopyWarnings and FutureWarnings

    Without the patches, running the processing script will make Pandas print 2 warnings, SettingWithCopyWarnings and FutureWarnings.
    The SettingWithCopyWarnings came from the fact that chained indexing was performed on a few dataframes.
    Since chained indexing may return a copy of the dataframe or dataframe itself, this causes ambiguity on
    whether assignments to the indexed dataframes would change the original, or merely a copy.
    This is resolves the warnings by explicitly using the copy() function to make copies of the dataframes.
    
    As for the FutureWarnings, these were caused by assigning strings to empty columns, whose values default to NaN (float).
    Since float is incompatible with strings, this raises a warning. This is fixed by explicitly type casting certain columns
    QuanMPhm committed May 10, 2024
    Configuration menu
    Copy the full SHA
    a76b353 View commit details
    Browse the repository at this point in the history