将日期更改为会计月熊猫python

时间:2016-10-14 15:32:13

标签: python pandas

我希望使用python pandas将df中的日期更改为新列中的会计月份。

这是一个例子

17/01/2016    201601
18/01/2016    201602

你能帮我拿到所需的python代码吗?

1 个答案:

答案 0 :(得分:2)

您可以这样做:

// This line pulls the value that I want to place in the label
Label astylbl = (Label)GetAssetTypeFV.Row.FindControl("AssetTypeLabel");

// This sequence should be setting the value collect above into the label 
// NOTE! That the Label has been prepopulated with data to make sure it isn't 

Label ATTL = (Label)GetAssetTypeFV.Row.FindControl("AssetTypeTextLabel");
  if (ATTL != null)
      ATTL.Text = astylbl.Text;