date-formatting

Adding days to a ISO 8601 format date in Python

Adding days to a ISO 8601 format date in Python Question: I need to add +3 hours to a date in iso 8601 format in python, for example "2022-09-21T22:31:59Z" due to time difference. In this time information that is returned to me from the API, I only need Y/M/D information, but due to the +3 …

Total answers: 2

Convert months to German acronym

Convert months to German acronym Question: I am looking for a solution to convert English names for "Jan, Feb, Mar, Apr, May" to "Jan, Feb, Mär, Apr, Mai". I already tried to include "locale". I also have a column with a Timestamp-Series, may this helps import locale import pandas as pd locale.getlocale() locale.setlocale(locale.LC_TIME, ‘deu_deu’) d …

Total answers: 2

How to specify date format when using pandas.to_csv?

How to specify date format when using pandas.to_csv? Question: The default output format of to_csv() is: 12/14/2012 12:00:00 AM I cannot figure out how to output only the date part with specific format: 20121214 or date and time in two separate columns in the csv file: 20121214, 084530 The documentation is too brief to give …

Total answers: 4