SABS-R3-Epidemiology / branchpro

Using branching processes to estimate the time-dependent reproduction number of a disease with imported cases
BSD 3-Clause "New" or "Revised" License
4 stars 1 forks source link

Bug in Ontario's parse_data.py #193

Closed FarmHJ closed 3 years ago

FarmHJ commented 3 years ago

While working on makefile to run the parse_data.py for the paper repository, I tried to run the parse_data.py for all regions. I received an error when running Ontario's parse_data.py.

data_library/processed_data/covid_ontario/parse_data.py:53: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy                                                                                                     
local_data['Close contact'] = local_data['Close contact'] + local_data[
rccreswell commented 3 years ago

Thanks for catching this @FarmHJ Fix : https://github.com/SABS-R3-Epidemiology/branchpro/pull/194 When it's merged here, you can copy it to the organize data PR. When the results repository is ready, I will be in favor of removing the data from this repository to avoid duplicating, but until then it's probably best to keep a working version here.