parent
6f451e05ac
commit
d2ed73dccf
|
@ -38,6 +38,7 @@ def getDataForPlot(phone_data_yield_per_segment):
|
||||||
for columns in columns_for_full_index:
|
for columns in columns_for_full_index:
|
||||||
full_index = full_index + columns
|
full_index = full_index + columns
|
||||||
full_index = pd.MultiIndex.from_tuples(full_index, names=("local_segment_start_datetimes", "minutes_after_segment_start"))
|
full_index = pd.MultiIndex.from_tuples(full_index, names=("local_segment_start_datetimes", "minutes_after_segment_start"))
|
||||||
|
phone_data_yield_per_segment = phone_data_yield_per_segment[["local_segment_start_datetimes", "minutes_after_segment_start"]].drop_duplicates(keep="first")
|
||||||
phone_data_yield_per_segment = phone_data_yield_per_segment.set_index(["local_segment_start_datetimes", "minutes_after_segment_start"]).reindex(full_index).reset_index().fillna(0)
|
phone_data_yield_per_segment = phone_data_yield_per_segment.set_index(["local_segment_start_datetimes", "minutes_after_segment_start"]).reindex(full_index).reset_index().fillna(0)
|
||||||
|
|
||||||
# transpose the dataframe per local start datetime of the segment and discard the useless index layer
|
# transpose the dataframe per local start datetime of the segment and discard the useless index layer
|
||||||
|
|
Loading…
Reference in New Issue