PANDAS
Cheat Sheet
NAS.IO/ARTIFICIALINTELLIGENCE
1. Basic Commands
Pandas is a software library for Python that
provides tools for data manipulation and
analysis. It's important to ensure that the
correct version of pandas is installed for
compatibility with your code.
- Importing Pandas:
- Checking Pandas
Version:
NAS.IO/ARTIFICIALINTELLIGENCE
2. Dataframe Creation
Dataframes are two-dimensional labeled data
structures with columns potentially of different
types.
You can think of it like a spreadsheet or SQL
table.
- From a list:
- From a Dictionary:
NAS.IO/ARTIFICIALINTELLIGENCE
3. Data Selection
- Selecting a column:
- Selecting multiple columns:
Pandas provides different methods for data
selection.
NAS.IO/ARTIFICIALINTELLIGENCE
- Selecting rows:
- Selecting specific value:
NAS.IO/ARTIFICIALINTELLIGENCE
4. Data Manipulation
Pandas provide various ways to manipulate a dataset.
- Adding a column:
- Deleting a column:
NAS.IO/ARTIFICIALINTELLIGENCE
- Renaming columns:
- Applying a function to a column:
NAS.IO/ARTIFICIALINTELLIGENCE
5. Data Cleaning
Data cleaning is detecting and correcting (or
removing) corrupt or inaccurate records from a
dataset.
- Checking for null values:
- Dropping null values:
NAS.IO/ARTIFICIALINTELLIGENCE
Filling null values:
- Replacing values:
NAS.IO/ARTIFICIALINTELLIGENCE
6. Grouping & Aggregation
Grouping involves combining data based on some
criteria, while aggregation is the process of
turning the results of a query into a single row.
- Group by:
- Aggregation:
NAS.IO/ARTIFICIALINTELLIGENCE
7. Merging, Joining, and
Concatenating
Pandas provides various ways to combine
DataFrames including merge and join.
- Concatenating:
NAS.IO/ARTIFICIALINTELLIGENCE
- Merging:
- Joining:
NAS.IO/ARTIFICIALINTELLIGENCE
8. Working with Dates
Pandas provides powerful functionalities for
working with dates.
- Convert to datetime:
- Extracting date parts:
NAS.IO/ARTIFICIALINTELLIGENCE
9. File I/O
Pandas can seamlessly read from and write
to a variety of file formats.
- Reading a CSV file:
- Writing to a CSV file:
- Similarly for other file formats like
NAS.IO/ARTIFICIALINTELLIGENCE
Next Steps
1. Advanced Visualization Workshops: Dive
deeper into the intricacies of data visualization
with hands-on workshops.
2. Data Science Bootcamps: A
comprehensive, project-based learning
experience to enhance your data science
skills.
3. AI Innovation Hub: Collaborate with
fellow learners and industry experts on
cutting-edge AI projects.
NAS.IO/ARTIFICIALINTELLIGENCE
Next Steps
4. Community Webinars: Regular webinars on
the latest trends, tools, and best practices in AI
and Data Science.
5. Peer-to-Peer Learning: Engage in
discussion forums, group projects, and
mentorship programs.
NAS.IO/ARTIFICIALINTELLIGENCE
What Next? Join the Free AI Community
Three weekly events
Live workshops
Knowledge Shorts 50+ Videos
Basic AI & DS courses
DS & AI materials
Webinar recording
Guidance from experts
24 by 7 Whatsapp & Discord
Latest ai Discussion & More...
nas.io/artificialintelligence
Community Profile
What Does The Community Provide?
Gen AI Courses Recordings
✅ Generative AI (chatGPT) for Business ✅ Outcome-based Workshops
✅Prompt Engineering for Developers ✅ AI Community Meetup Recordings
✅Langchain for AI App Development ✅ Python Projects Videos
✅ AI & DS Career & Learning Webinar Series
Data Science Courses Resources
✅ Basic Excel For Data Science ✅ Generative AI Resources
✅ Basic SQL For AI/Data Science ✅ Sample Datasets & Projects
✅ Basic Python for AI/Data Jobs ✅ Sample Reviewed Resume
✅ Advanced Python for AI/DS Jobs ✅ Ready to use Resume Template
✅ Basic PowerBI for AI/Data Science ✅ Linkedin Profile Optimization
✅ Machine Learning ✅ Essential SQL Documents
✅ Knowledge Shorts ✅ Essential Python Documents
✅ Machine Learning Documents
Every week we have live Zoom calls, Physical Meetups and LinkedIn Audio events and
WhatsApp discussions. All calls are recorded and archived.
nas.io/artificialintelligence