Skip to content
Advertisement

Tag: datetime

Adding date to pd.to_datetime

I’m looking for a way to add custom date to pd.to_datetime. So, for example: Print: pd.to_datetime keeps adding today’s date which is fine in case of csv_file but csv_file2 need to contain tomorrow’s date. Here’s sample of csv files: Answer Idea is create helper column file for distingush if tomorrow and last add 1 day by condition for compare new

How to read 24:00 hour?

I have a csv file with 24:00 hour instead of 00:00 and try to read it with pandas. I found solution and try to adopt it. The problem is, I get an error and don’t know how to fix it. Can someone help me? My csv: The code I got from the link above adopted to my case: The error

Convert object column format “%d-%b-%y” to datetime, where month initial letter is Upper or lowercase and Month can be in italian or english

For this dataframe (link): I want to convert columns [Issue date, Redemption date] to datetime format. The format variations are: Month is lower case: 01-set-09 Month in Italian 01-set-09 (settembre-italian instead of September-English) I have tried using: and this one: however i get the following error: Here is a working code that generates my error: EDIT FROM MrFuppes answer when

Get all dates between start and end date pandas columns

I’m trying to get a list of dates between two start and end date pandas columns, with individual IDs. I’ve found an answer that is basically what I’m after (https://stackoverflow.com/a/53409207/14463396) but this only works if the periods between the start and end dates don’t overlap, and I can’t seem to work out how to adapt this/use an alternative method to

Advertisement