0% found this document useful (0 votes)
5 views7 pages

? Pandas Functions

The document provides a comprehensive overview of essential Pandas functions and methods organized into categories such as Data Input/Output, Creating Data, Viewing Data, Selection & Indexing, Data Cleaning, and more. Each category lists specific functions along with brief descriptions of their purposes. Additionally, it mentions the availability of over 1000 functions in Pandas, emphasizing that users will primarily utilize the top 100 functions for their tasks.

Uploaded by

Ranjeet
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views7 pages

? Pandas Functions

The document provides a comprehensive overview of essential Pandas functions and methods organized into categories such as Data Input/Output, Creating Data, Viewing Data, Selection & Indexing, Data Cleaning, and more. Each category lists specific functions along with brief descriptions of their purposes. Additionally, it mentions the availability of over 1000 functions in Pandas, emphasizing that users will primarily utilize the top 100 functions for their tasks.

Uploaded by

Ranjeet
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

🐼 Pandas Functions & Methods (Organized)

1. Data Input / Output (I/O)

 pd.read_csv() – Read CSV file

 pd.to_csv() – Save to CSV

 pd.read_excel() / pd.to_excel() – Excel files

 pd.read_sql() – From SQL databases

 pd.read_json() – JSON files

 pd.read_html() – HTML tables

 pd.read_clipboard() – From clipboard

2. Creating Data

 pd.DataFrame() – Create DataFrame

 pd.Series() – Create Series

 pd.date_range() – Generate date range

 pd.DataFrame.from_dict(), pd.DataFrame.from_records()

3. Viewing Data

 df.head() / df.tail() – View top/bottom rows

 df.info() – Summary of dataset

 df.describe() – Statistics summary

 df.shape – Rows and columns

 df.columns, df.index, df.dtypes

4. Selection & Indexing

 df['col'], df[['col1','col2']] – Select columns

 df.loc[] – Label-based selection


 df.iloc[] – Index-based selection

 df.at[], df.iat[] – Fast access single value

 df.filter() – Filter rows/columns

5. Data Cleaning

 df.dropna() – Remove missing values

 df.fillna() – Replace missing values

 df.replace() – Replace values

 df.drop() – Drop rows/columns

 df.rename() – Rename columns

 df.duplicated(), df.drop_duplicates()

6. Sorting & Ordering

 df.sort_values() – Sort by column values

 df.sort_index() – Sort by index

7. Aggregation & Statistics

 df.mean(), df.median(), df.sum()

 df.min(), df.max(), df.std(), df.var()

 df.corr(), df.cov()

 df.value_counts() – Frequency count

 df.mode() – Most frequent value

8. GroupBy & Pivot

 df.groupby() – Group data

 df.pivot_table() – Create pivot table


 df.agg() – Multiple aggregations

9. Merging & Joining

 pd.concat() – Concatenate DataFrames

 pd.merge() – Merge DataFrames

 df.join() – Join DataFrames

10. String Operations (Series.str)

 df['col'].str.lower(), .upper(), .strip()

 df['col'].str.contains()

 df['col'].str.replace()

 df['col'].str.split()

11. Datetime Operations (Series.dt)

 df['date'].dt.year, .month, .day

 df['date'].dt.weekday

 df['date'].dt.strftime('%Y-%m-%d')

12. Reshaping Data

 df.melt() – Unpivot

 df.pivot() – Pivot

 df.stack() / df.unstack()

 df.transpose()

13. Apply Functions

 df.apply() – Apply function row/column-wise


 df.applymap() – Apply elementwise on DataFrame

 df.map() – Apply elementwise on Series

14. Visualization

 df.plot() – Basic plotting

 df.hist(), df.boxplot()

15. Exporting

 df.to_csv() – Save as CSV

 df.to_excel() – Save as Excel

 df.to_sql() – Save to SQL

 df.to_json() – Save as JSON

⚡ Pandas has 1000+ functions (many under .str, .dt, .plot, .groupby etc.). You’ll rarely use all —
instead, you’ll mostly use the top 100 functions above.

👉 Do you want me to create a cheat sheet PDF with all important Pandas functions (with
examples) so you can keep it for quick reference while coding?

You said:

show all function in single page

ChatGPT said:

Got it 👍 — you want a single-page Pandas function reference (like a cheat sheet).
Here’s a compact list of the most useful Pandas functions in one place (no long explanations,
just grouped functions):

🐼 Pandas Functions – One Page Cheat Sheet

📥 Input / Output
 pd.read_csv(), pd.to_csv()

 pd.read_excel(), pd.to_excel()

 pd.read_sql(), pd.to_sql()

 pd.read_json(), pd.to_json()

 pd.read_html(), pd.read_clipboard()

🛠 Create Data

 pd.DataFrame(), pd.Series()

 pd.date_range(), pd.DataFrame.from_dict()

👀 View Data

 df.head(), df.tail(), df.sample()

 df.info(), df.describe(), df.shape

 df.columns, df.index, df.dtypes

🎯 Select / Index

 df['col'], df[['c1','c2']]

 df.loc[], df.iloc[], df.at[], df.iat[]

 df.filter()

🧹 Clean Data

 df.dropna(), df.fillna(), df.replace()

 df.drop(), df.rename()

 df.duplicated(), df.drop_duplicates()

📊 Sort / Rank
 df.sort_values(), df.sort_index()

 df.rank()

📈 Stats / Aggregation

 df.mean(), df.median(), df.sum()

 df.min(), df.max(), df.std(), df.var()

 df.corr(), df.cov()

 df.value_counts(), df.mode()

👥 Grouping / Pivot

 df.groupby()

 df.pivot(), df.pivot_table()

 df.agg()

🔗 Merge / Join

 pd.concat()

 pd.merge()

 df.join()

🔤 String Ops (.str)

 .lower(), .upper(), .strip()

 .contains(), .replace(), .split()

🕒 Datetime Ops (.dt)

 .year, .month, .day, .weekday

 .strftime()
🔄 Reshape

 df.melt(), df.pivot()

 df.stack(), df.unstack()

 df.transpose()

🧩 Apply Functions

 df.apply(), df.applymap(), df.map()

📉 Plotting

 df.plot(), df.hist(), df.boxplot()

📤 Export

 df.to_csv(), df.to_excel(), df.to_sql(), df.to_json()

You might also like