pandas and NumPy 3 · Grouping and combining
Join two DataFrames
Join on a key, like SQL. how can be inner, left, right or outer.
pd.merge(orders, users, left_on="user_id", right_on="id", how="left")
Official pandas and NumPy 3 documentation
More grouping and combining commands
- Group and aggregate
- Create a pivot table
- Stack DataFrames
- Compute a moving average
- Aggregate by time period
- Save to a CSV file
All grouping and combining commands · pandas and NumPy 3 cheatsheet