Reading a CSV into #Python #Pandas, and parse_dates doesn't recognize the format? Pass the date_format keyword arg:
df = pd.read_csv(filename,
parse_dates=['x', 'y'],
date_format='%Y-%m-%d %H:%M:%S')
All strftime codes work!
mastodon 4.7.3Helping you become fluent with Python and Pandas since 1995.
Having a tough time remembering #Python strptime vs. strftime?
- The "p" (strptime) is for parsing, getting a datetime from a string
- The "f" (strftime) is for formatting, getting a string from a datetime
For help remembering the format codes, turn to https://www.strfti.me/ !
Do you love analyzing data with #Python and #Pandas?
And have you been following NASA's Artemis II mission?
Then you'll really enjoy tomorrow's Bamboo Weekly!
More info: https://BambooWeekly.com
Do Americans pay more taxes than in other countries? Do they pay more in income taxes?
Explore OECD data with #Python, #Pandas, Marimo, and Claude Code (plus the new marimo-pair skill) in the latest Bamboo Weekly, and find out!
Read all about it: https://BambooWeekly.com
It's tax day in the US — and according to Gallup, Americans think taxes are too high. But... how high are they vs. other countries?
In the latest Bamboo Weekly, I pose 6 questions about taxes. Can you solve them with marimo-pair, Marimo, Claude Code, and #Python #Pandas?
Check it out: https://BambooWeekly.com
The Strait of Hormuz is closed — which, we know, is stopping oil exports.
But a lot of the world's fertilizer also comes from there.
How much? And which countries depend on it?
That's what we analyze, with #Python #Pandas, in the latest Bamboo Weekly!
Check it out: https://BambooWeekly.com
Artemis II is nearly over — but there's still time to solve six data-analysis problems about Orion's location and speed with #Python and #Pandas!
New data challenges every Wednesday. Solutions every Thursday.
Learn more: https://BambooWeekly.com