我在panda/python中创建了一个表,创建了一个以月为列的表,月/年将显示在该列中。我一直在尝试让它显示一个月又一个月,比如说一月,然后二月。但是我面临的问题是,它在整个专栏中一直显示同一个月和年份,正如你可以看到三月在整个专栏中出现一样。你知道吗
这是我用过的for循环
month_count = 0
for row_num in range (4,20):
# TABLE 1
vsr_tracker.write_formula(
'B' + str(row_num),
'=DATE(2016,2+{0},1)'.format(month_count))
row_num + 1))
as you can see on the screenshot that it the month march has been printed throughout the column
您的程序不会将月份增加+1,您必须将其添加到循环中的日期。 如果你想把天数也增加1,你也得增加天数。你知道吗
相关问题 更多 >
编程相关推荐