Replace deprecating pandas methods.

This commit is contained in:
Christopher Charbonneau Wells 2017-11-18 07:42:48 -05:00
parent b5d2a0b7f4
commit 9311fe2cee
1 changed files with 3 additions and 3 deletions

View File

@ -100,7 +100,7 @@ def sleep_pattern(instances):
if start_time.utcoffset() != end_time.utcoffset(): if start_time.utcoffset() != end_time.utcoffset():
diff = start_time.utcoffset() - end_time.utcoffset() diff = start_time.utcoffset() - end_time.utcoffset()
duration -= timezone.timedelta(seconds=diff.seconds) duration -= timezone.timedelta(seconds=diff.seconds)
y_df.set_value(df_index - 1, start_date, duration.seconds/60) y_df.at[df_index - 1, start_date] = duration.seconds/60
last_end_time = end_time last_end_time = end_time
@ -171,6 +171,6 @@ def _add_sleep_entry(y_df, text_df, index, column, duration, text=''):
text_df.assign(**{column: 0 in range(0, len(text_df.index))}) text_df.assign(**{column: 0 in range(0, len(text_df.index))})
index = 0 index = 0
y_df.set_value(index, column, duration) y_df.at[index, column] = duration
text_df.set_value(index, column, text) text_df.at[index, column] = text
return index + 1 return index + 1