我的 CSV 内容有三列,如 1.1K 列。这具有 5 分钟 TIME_BUCKET 的值,例如 03:40:00+00:00、03:45:00+00:00 等。我希望该图表能够为所有这些不同的 TIME_BUCKETS 绘制直方图,但它实际上是每小时绘制一次图表时间段,例如 03:00、04:00 等。
我的代码如下
import pandas as pd
import plotly.express as px
df = pd.read_csv("D:/Work/WORK/2021/FEB21/BiPA/nqquery/Issue/5MinTimeBucketHistogramNotWorking1.csv")
graph = px.histogram(df, x='TIME_BUCKET', color='REPORT_NAME', title='Report Category Wise Execution Count (5 minuntes sample size)')
graph.show()
我的 CSV 内容如下所示,有 1.1K 列。此处共享整个 CSV以供参考。
,REPORT_NAME,TIME_BUCKET
23,DashboardReport,2021-01-20 03:30:00+00:00
33,DashboardReport,2021-01-20 03:40:00+00:00
69,ExportReport,2021-01-20 03:40:00+00:00
74,ExportReport,2021-01-20 03:40:00+00:00
97,ExportReport,2021-01-20 03:40:00+00:00
98,ExportReport,2021-01-20 03:40:00+00:00
99,ExportReport,2021-01-20 03:40:00+00:00
101,ExportReport,2021-01-20 03:40:00+00:00
103,ExportReport,2021-01-20 03:40:00+00:00
2821,DashboardReport,2021-01-20 15:40:00+00:00
2822,DashboardReport,2021-01-20 15:40:00+00:00
2823,DashboardReport,2021-01-20 15:45:00+00:00
2896,DashboardReport,2021-01-20 16:15:00+00:00
3283,SQLReport,2021-01-20 19:00:00+00:00
3285,DashboardReport,2021-01-20 19:00:00+00:00
3288,DashboardReport,2021-01-20 19:05:00+00:00
3289,DashboardReport,2021-01-20 19:05:00+00:00
3292,ImportReport,2021-01-20 19:05:00+00:00
3293,DashboardReport,2021-01-20 19:05:00+00:00
3294,DashboardReport,2021-01-20 19:05:00+00:00
3295,DashboardReport,2021-01-20 19:10:00+00:00
3297,DashboardReport,2021-01-20 19:10:00+00:00
3298,SQLReport,2021-01-20 19:10:00+00:00
3300,DashboardReport,2021-01-20 19:10:00+00:00
3303,SQLReport,2021-01-20 19:15:00+00:00
3307,ImportReport,2021-01-20 19:15:00+00:00
3309,DashboardReport,2021-01-20 19:15:00+00:00
3312,DashboardReport,2021-01-20 19:15:00+00:00
3313,DashboardReport,2021-01-20 19:15:00+00:00
3314,SQLReport,2021-01-20 19:15:00+00:00
3315,DashboardReport,2021-01-20 19:15:00+00:00
3316,DashboardReport,2021-01-20 19:15:00+00:00
3317,DashboardReport,2021-01-20 19:15:00+00:00
3318,ImportReport,2021-01-20 19:15:00+00:00
3319,DashboardReport,2021-01-20 19:15:00+00:00
3324,DashboardReport,2021-01-20 19:20:00+00:00
3328,SQLReport,2021-01-20 19:20:00+00:00
3331,ImportReport,2021-01-20 19:20:00+00:00
3332,ImportReport,2021-01-20 19:20:00+00:00
3335,DashboardReport,2021-01-20 19:20:00+00:00
3336,ImportReport,2021-01-20 19:20:00+00:00
3337,DashboardReport,2021-01-20 19:20:00+00:00
3339,DashboardReport,2021-01-20 19:20:00+00:00
3344,DashboardReport,2021-01-20 19:20:00+00:00
3345,DashboardReport,2021-01-20 19:20:00+00:00
3349,DBReport,2021-01-20 19:20:00+00:00
3350,SQLReport,2021-01-20 19:20:00+00:00
3354,DashboardReport,2021-01-20 19:20:00+00:00
3355,DashboardReport,2021-01-20 19:20:00+00:00
3356,DashboardReport,2021-01-20 19:20:00+00:00
3357,DashboardReport,2021-01-20 19:20:00+00:00
3358,DashboardReport,2021-01-20 19:20:00+00:00
3359,DashboardReport,2021-01-20 19:20:00+00:00
3360,DashboardReport,2021-01-20 19:20:00+00:00
3368,DashboardReport,2021-01-20 19:25:00+00:00
3370,DashboardReport,2021-01-20 19:25:00+00:00
3375,DashboardReport,2021-01-20 19:25:00+00:00
3377,DashboardReport,2021-01-20 19:30:00+00:00
3379,DashboardReport,2021-01-20 19:30:00+00:00
3381,DashboardReport,2021-01-20 19:30:00+00:00
3384,DashboardReport,2021-01-20 19:30:00+00:00
3396,ImportReport,2021-01-20 19:40:00+00:00
3398,DashboardReport,2021-01-20 19:40:00+00:00
3403,DashboardReport,2021-01-20 19:45:00+00:00
3404,DashboardReport,2021-01-20 19:45:00+00:00
3408,DashboardReport,2021-01-20 19:45:00+00:00
3410,DashboardReport,2021-01-20 19:45:00+00:00
3418,DashboardReport,2021-01-20 19:50:00+00:00
3419,SQLReport,2021-01-20 19:50:00+00:00
3421,DashboardReport,2021-01-20 19:50:00+00:00
3422,DashboardReport,2021-01-20 19:50:00+00:00
3429,DashboardReport,2021-01-20 19:50:00+00:00
3434,DashboardReport,2021-01-20 19:55:00+00:00
3443,ImportReport,2021-01-20 20:00:00+00:00
3444,ImportReport,2021-01-20 20:00:00+00:00
3450,DBReport,2021-01-20 20:05:00+00:00
3451,DBReport,2021-01-20 20:05:00+00:00
3489,SQLReport,2021-01-20 20:20:00+00:00
3490,ImportReport,2021-01-20 20:20:00+00:00
3496,DashboardReport,2021-01-20 20:20:00+00:00
3499,ImportReport,2021-01-20 20:25:00+00:00
3501,DashboardReport,2021-01-20 20:25:00+00:00
3505,DashboardReport,2021-01-20 20:25:00+00:00
3513,SQLReport,2021-01-20 20:30:00+00:00
3514,DashboardReport,2021-01-20 20:35:00+00:00
3521,SQLReport,2021-01-20 20:35:00+00:00
3522,DashboardReport,2021-01-20 20:35:00+00:00
3523,DashboardReport,2021-01-20 20:35:00+00:00
3527,DashboardReport,2021-01-20 20:40:00+00:00
3537,DashboardReport,2021-01-20 20:40:00+00:00
3538,DashboardReport,2021-01-20 20:40:00+00:00
3540,DashboardReport,2021-01-20 20:45:00+00:00
3549,DashboardReport,2021-01-20 20:50:00+00:00
3552,DashboardReport,2021-01-20 20:55:00+00:00
3555,SQLReport,2021-01-20 20:55:00+00:00
3556,DashboardReport,2021-01-20 20:55:00+00:00
3557,SQLReport,2021-01-20 20:55:00+00:00
3558,DashboardReport,2021-01-20 20:55:00+00:00