我有以下pandas使用pyarrow后端的对象:
crsp_m.info(verbose = True)
out:
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 4921811 entries, 0 to 4921810
Data columns (total 87 columns):
# Column Dtype
--- ------ -----
0 permno int64[pyarrow]
1 secinfostartdt date32[day][pyarrow]
2 secinfoenddt date32[day][pyarrow]
3 securitybegdt date32[day][pyarrow]
4 securityenddt date32[day][pyarrow]
字符串
我想把这些日子推回到月底,类似于我使用pandas日期时间所做的:
crsp_m["date"] = pd.to_datetime(crsp_m.date)
crsp_m["date"] = crsp_m.date + pd.tseries.offsets.MonthEnd(0)
型date32[day][pyarrow]
对象的等价操作是什么?
1条答案
按热度按时间hs1ihplo1#
也许只是转换后?
字符串