1
Good morning, everyone!
I’m analyzing a conjunto de dados de compartilhamento de bicicletas
. In that dataset
there is a column called 'birthyear'
, indicating the year of birth of the user.
I am trying to turn this column into a time series column. To do this, I have created the following iteration:
saved this column in a variable called yr
for i in yr:
x = datetime(yr[i],1,1)
print(x)'
The exit is:
1964-01-01 00:00:00
1986-01-01 00:00:00
1967-01-01 00:00:00
1976-01-01 00:00:00
1991-01-01 00:00:00
1975-01-01 00:00:00
1975-01-01 00:00:00
But when I store the output in the variable 'x'
, it does not store this list, but only the first line.
Saída: datetime.datetime(1975, 1, 1, 0, 0)
How can I solve this problem ?
would be able to post the yr code here?
– Marcus Pereira
yr = dataframe.birthyear
– Bruno