try:
daynumber = [0,1,2,3,4,5,6]
weekday = ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday']
df = df.rename(index=dict(zip(daynumber,weekday)))
df
output:
Date ...
Monday ...
Tuesday ...
Wednesday ...
Thursday ...
Friday ...
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.