Debug ValueError for index.

See exploration/debug_heatmap.py for illustration.
labels
junos 2021-12-15 16:03:04 +01:00
parent 6f451e05ac
commit d2ed73dccf
1 changed files with 1 additions and 0 deletions

View File

@ -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