Good morning everyone!
I'm parsing a conjunto de dados de compartilhamento de bicicletas
. In this dataset
there is a column named 'birthyear'
, which indicates the year the user was born.
I'm trying to turn this column into a time series column. To do this, I created the following iteration:
I saved this column in a variable called yr
for i in yr:
x = datetime(yr[i],1,1)
print(x)'
The output 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 'x'
variable, 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?