Skip to content
Errors
Commands
Flags
Config
Cheat sheets
Changes
Compat
Codes
Compare
Glossary
Search
Ctrl K
Browse
Error Messages
Commands
Flags & Options
Config Reference
Cheat Sheets
Version Changes
Compatibility
Codes & Tables
X vs Y
Glossary
All tools
Home
Tools
pandas
Data & ML
pandas
Python data analysis library.
Official documentation
Errors
1
Commands
1
Flags
1
Config
1
Cheat sheets
1
Changes
1
Compare
1
SettingWithCopyWarning: A value is trying to be set on a copy of a slice
pandas 2 warns SettingWithCopyWarning when you assign to a filtered DataFrame that may be a copy. Use .loc on the original or .copy(); pandas 3 removed it.
All pandas error messages
pandas merge: join DataFrames on a key (inner, left, outer)
pd.merge(left, right, on='id', how='left') joins DataFrames like SQL. how picks inner, left, right, outer or cross; validate= catches duplicated keys.
All pandas commands
pandas read_csv low_memory and DtypeWarning: Columns have mixed types
read_csv parses big files in chunks; when chunks infer different types it warns DtypeWarning: Columns have mixed types. Set dtype or use low_memory=False.
All pandas flags & options
pandas display options: show all columns and rows (display.max_columns)
pandas truncates wide and long DataFrames when printing. Set display.max_columns and display.max_rows to None to see everything, or use option_context once.
All pandas config reference
pandas cheat sheet: read, select, filter, group and reshape
pandas cheat sheet: read CSV and Parquet, select with loc and iloc, filter rows, add columns, group and aggregate, pivot, handle missing values and write files.
All pandas cheat sheets
pandas 2 to 3: Copy-on-Write, the str dtype and other breaking changes
pandas 3.0 makes Copy-on-Write the only mode, infers strings as the new str dtype, drops SettingWithCopyWarning and needs Python 3.11+. Shown side by side.
All pandas version changes
pandas loc vs iloc: label-based vs position-based selection
loc selects rows and columns by label and includes the end of a slice; iloc selects by integer position and excludes it. Cases where they return different rows.
All pandas x vs y
Esc