Category "python-datetime"

How to compare just the date or just date time ignoring seconds in a Python Pandas dataframe column of mixed data types?

In a pandas dataframe, I have a column of mixed data types, such as text, integers and datetimes. I need to find columns where datetimes match: (1) exact values

How do I set or freeze time in python?

I want to set a fixed time using python different than that seen locally on my system , so that when I used datetime.date.today() I get to see the desired date

How do I reorder a long string of concatenated date and timestamps seperated by commas using Python?

I have a string type column called 'datetimes' that contains multiple dates with their timestamps, and I'm trying to extract the earliest and last dates (withou

How do I reorder a long string of concatenated date and timestamps seperated by commas using Python?

I have a string type column called 'datetimes' that contains multiple dates with their timestamps, and I'm trying to extract the earliest and last dates (withou

pandas to_dict with python native datetime type and not timestamp

I have a pandas DataFrame df that contains Timesatamp columns. I wish to create an iterator of rows (either via the iter.. methods or via to_dict) from df whe

Adding timestamp index column with a column header to existing csv (python)

#gets rid of spaces in existing csv headers def getColumns(readCSV): return [column.replace(' ','') for column in next(readCSV)] #insert format used to

Comparing two datetime strings

I have two DateTime strings. How would I compare them and tell which comes first? A = '2019-02-12 15:01:45:145' B = '2019-02-12 15:02:02:22'

how to extract open pull req properties from github using pygithub

I want to send notifications to the owners of old(60 days) open pull requests on github - this will help in making the git repo healthy . I could manage to extr

Getting today's date in YYYY-MM-DD in Python?

Is there a nicer way than the following to return today's date in the YYYY-MM-DD format? str(datetime.datetime.today()).split()[0]

How to convert integer into date object python?

I am creating a module in python, in which I am receiving the date in integer format like 20120213, which signifies the 13th of Feb, 2012. Now, I want to conver

Convert DataFrame column type from string to datetime

How can I convert a DataFrame column of strings (in dd/mm/yyyy format) to datetimes?