Relative Content

Tag Archive for pythondatetimepython-polars

Format datetime in polars

I have a polars dataframe that contains a datetime column. I want to convert this column to strings in the format %Y%m. For example, all dates in January 2024 should be converted to "202401".

Change datetime format on Polars

I have a polars dataframe that contains a datetime column. I want to change the format of this column to %Y%m for example to looks like 202401