如何使用 Data Refinery 将时间戳字段拆分为年、月、日等?
How to split a timestamp field into Year, Month, Day, etc with Data Refinery?
我有一个定义如下的时间戳字段:
Time interval: the beginning of the time interval expressed as the number of millisecond elapsed from the Unix Epoch on January 1st, 1970 at UTC. The end of the time interval can be obtained by adding 600000 milliseconds (10 minutes) to this value. TYPE: numeric
在 refinery 中有没有办法为年、月、日、星期几等创建单独的列?
pandas中的等价物是:
df['Datetime'] = pd.to_datetime(df['Time interval'].astype(int))
df['Year'] = df['Datetime'].dt.year
df['Month'] = df['Datetime'].dt.month
df['Day'] = df['Datetime'].dt.day
df['DayOfWeek'] = df['Datetime'].dt.dayofweek
Data Refinery 目前无法做到这一点。我用笔记本和 Pandas 来处理这个数据。
我有一个定义如下的时间戳字段:
Time interval: the beginning of the time interval expressed as the number of millisecond elapsed from the Unix Epoch on January 1st, 1970 at UTC. The end of the time interval can be obtained by adding 600000 milliseconds (10 minutes) to this value. TYPE: numeric
在 refinery 中有没有办法为年、月、日、星期几等创建单独的列?
pandas中的等价物是:
df['Datetime'] = pd.to_datetime(df['Time interval'].astype(int))
df['Year'] = df['Datetime'].dt.year
df['Month'] = df['Datetime'].dt.month
df['Day'] = df['Datetime'].dt.day
df['DayOfWeek'] = df['Datetime'].dt.dayofweek
Data Refinery 目前无法做到这一点。我用笔记本和 Pandas 来处理这个数据。