我正在尝试更改系列的索引。指数为Date
scashflow_series
就是这个系列,我只是想通过在索引上使用replace(month = cashflow_series.index[k].month + dict_no_months_between_payments[count])
来给这个日期添加一定数量的月份,并用它来替换以前的索引日期。但是,我得到了错误SyntaxError: Invalid Syntax
index_here = cashflow_series.index[k]
cashflow_series.index[k] = cashflow_series.index[k].reindex(index=index_here.(replace(month = cashflow_series.index[k].month + dict_no_months_between_payments[count])))
一组括号太多:
删除该项及其结束匹配项
相关问题 更多 >
编程相关推荐