onlyzdd / clinical-fusion

Clinical data fusion
29 stars 15 forks source link

A value is trying to be set on a copy of a slice from a DataFrame. #7

Open CalendulaED opened 3 years ago

CalendulaED commented 3 years ago

When I run the line python 02_extract_notes.py

it shows the following warnings and I think this might affect the rest of the code: `Reading data... sys:1: DtypeWarning: Columns (5) have mixed types.Specify dtype option on import or set low_memory=False. Extracting first 24 notes... 02_extract_notes.py:29: 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 df_early['hr'] = (df_early['charttime'] - df_early['admittime']) / np.timedelta64(1, 'h')`

image