Horje
I want to add a new column to the DataFrame containing only the month of the measurement Code Example
I want to add a new column to the DataFrame containing only the month of the measurement
In [11]: air_quality["month"] = air_quality["datetime"].dt.month

In [12]: air_quality.head()
Out[12]: 
    city country                  datetime location parameter  value   unit  month
0  Paris      FR 2019-06-21 00:00:00+00:00  FR04014       no2   20.0  µg/m³      6
1  Paris      FR 2019-06-20 23:00:00+00:00  FR04014       no2   21.8  µg/m³      6
2  Paris      FR 2019-06-20 22:00:00+00:00  FR04014       no2   26.5  µg/m³      6
3  Paris      FR 2019-06-20 21:00:00+00:00  FR04014       no2   24.9  µg/m³      6
4  Paris      FR 2019-06-20 20:00:00+00:00  FR04014       no2   21.4  µg/m³      6




Python

Related
where is a package stored python Code Example where is a package stored python Code Example
Python Pandas - How to write in a specific column in an Excel Sheet Code Example Python Pandas - How to write in a specific column in an Excel Sheet Code Example
ex: python Code Example ex: python Code Example
exclude serializer Code Example exclude serializer Code Example
custom permission class django rest framework Code Example custom permission class django rest framework Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7