Advertisement
AlexErin1308

Task #6

Mar 7th, 2024
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | Source Code | 0 0
  1. import pandas as pd
  2.  
  3. position = pd.read_csv('/datasets/position.csv')
  4. position['timestamp'] = pd.to_datetime(
  5.     position['timestamp'], format='%Y-%m-%dT%H:%M:%S'
  6. )
  7. position['month'] = pd.DatetimeIndex(position['timestamp']).month#Добавим столбец 'month' в таблицу position с номером месяца.
  8. print(position.head())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement