Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 resolved 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
- Loading branch information