sashahafner / pystupid

Some notes on Python syntax and more
GNU General Public License v3.0
2 stars 0 forks source link

Date/time in Pandas #20

Open sashahafner opened 9 months ago

sashahafner commented 9 months ago

Apparently a type of "object" means some kind of character data. Interesting name.

https://stackoverflow.com/questions/48503192/pandas-what-does-object-type-really-mean

sashahafner commented 9 months ago

Conversion to date/time https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.to_datetime.html

sashahafner commented 8 months ago

For time difference / elapsed time calculations the dt and total_seconds method/function/whatTFever stuff is handy. For example, from OAC course exercise:

air['etime_min'] = (air['timestamp'] - pd.to_datetime('03/10/2022 13:40')).dt.total_seconds() / 60
sashahafner commented 8 months ago

This may or may not be in the datetime module