【发布时间】:2018-07-22 15:15:37
【问题描述】:
我在 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
【问题讨论】: