How to make good reproducible pandas examples #python #pandas https://stackoverflow.com/q/20109391/1288
How to make good reproducible pandas examples

Having spent a decent amount of time watching both the r and pandas tags on SO, the impression that I get is that pandas questions are less likely to contain reproducible data. This is something th...

Stack Overflow

The Strait of Hormuz remains closed. And US gas prices continue to rise.

Bamboo Weekly challenges you to use #Python #Pandas to find where they're highest, how much they've increased — plus create interactive maps.

Level up your data skills every Wednesday!

Check it out: https://BambooWeekly.com

My micro-review of one #pandas lesson at #datacamp.com.

tldr; In the end it is just classical tutorials made interactive with #AI.

There are way too many lessons, many look the same or you need to follow tenths just to learn one language. You'll definitely need the AI assistant to build a #learning path for you.
In a given lesson the onboarding process is smooth and well paced, with short introductions and exercices.
The UI seems nice at first, with audio and precise feedbacks on (...)

Title: P3: PowerBI + PostgreSQL - online analytic [2025-02-23 Sun]

'int64': Integer,
'datetime64[ns]': DateTime,
'datetime64': DateTime
}

And I created very nice automatic comparison of any two
files in Jupyter with histograms and bar plots.
#dailyreport #powerbi #datawarehouse #dwh #postgresql #python #pandas

Title: P2: PowerBI + PostgreSQL - online analytic [2025-02-23 Sun]

I split all columns to strings and numeric by converting
with Pands function pd.to_numeric and checking if errors
happens.

In PowerBI I download one table with date indexes for
slices and create second table with latest slice.

SQLAlchemy
dtype_mapping = {
'object': String,
'float64': Float, #dailyreport #powerbi #datawarehouse #dwh #postgresql #python #pandas

Title: P1: PowerBI + PostgreSQL - online analytic [2025-02-23 Sun]

+ For real-time operations: Redis > MongoDB > MySQL >
PostgreSQL > SQLite.

For PostgreSQL I prepare data in Python script that use:
- pandas - for coverting types to datetime and numeric
- sqlalchemy - for simplifying type converstion
- asyncpg - sqlalchemy backend to connect to PostgreSQL #dailyreport #powerbi #datawarehouse #dwh #postgresql #python #pandas

Title: P0: PowerBI + PostgreSQL - online analytic [2025-02-23 Sun]

At this week I installed PowerBI and connect it to remote
PostgreSQL.
I asked AI to compare open-source data sources for
PowerBI and compare them by:
- Ease of Setup on Linux: SQLite > PostgreSQL > MySQL >
Redis > MongoDB
- Performance:
+ For large datasets: MongoDB > PostgreSQL > MySQL >
Redis > SQLite. #dailyreport #powerbi #datawarehouse #dwh #postgresql #python #pandas

Want to round #Python #Pandas datetimes? You have 3 options:

- dt.floor — earlier
- dt.ceil - later
- dt.round — nearest

For example:

s.dt.floor('3h') # previous multiple-of-3 hour
s.dt.ceil('15m') # next 15-minute block
s.dt.round('1D') # nearest 1 day

Want to set the time on a #Python #Pandas series of datetimes to midnight? Use dt.normalize:

df['x'].dt.normalize()

You get back series of datetime values, but all times are 00:00:00.

Want to convert a #Python #Pandas datetime column to Unix time (seconds since 1970)?

df['date'].astype('int64')

That's it! No division needed.