here is my code:
df["Created"] = pd.to_datetime(df["Created"]) df.groupby(df.Created.dt.weekday).size().plot(linewidth = 0.4, x_compat=True)
I would like to show the name of the day on the graph and also by which day the week starts in pandas?
Try dt.day_name instead of weekday
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.dt.day_name.html#pandas-series-dt-day-name
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.