Professional Documents
Culture Documents
Cheat Sheet
NAS.IO/ARTIFICIALINTELLIGENCE
1 . Basi c 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:
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. Dat a Sel ect i on
- Selecting a column:
NAS.IO/ARTIFICIALINTELLIGENCE
- Selecting rows:
NAS.IO/ARTIFICIALINTELLIGENCE
4. Dat a Mani pul at i on
P a n das p r o v i d e v a r i o u s w a ys to manipulate a dataset.
- A dding a c ol u m n :
- Deleting a column:
NAS.IO/ARTIFICIALINTELLIGENCE
- Renaming columns:
NAS.IO/ARTIFICIALINTELLIGENCE
5. Dat a Cl eani ng
D a t a cle a n i n g i s d e t e c t i n g and correcting (or removing)
c o r rupt o r i n ac c u r a t e r e c o rds from a dataset.
- C hecki n g f or n u l l v a l u e s :
- D roppi n g n ul l v a l u e s :
NAS.IO/ARTIFICIALINTELLIGENCE
F i l ling n u l l v al u e s :
- Replacing values:
NAS.IO/ARTIFICIALINTELLIGENCE
6. Groupi ng & Aggregat i on
G r o upi n g i n v o l v e s c o m b i n i ng data based on some criteria,
w h i le ag g r e g at i o n i s t h e p rocess of turning the results of a
q u e ry in t o a si n g l e r o w .
- G roup b y :
- A ggreg a t i o n:
NAS.IO/ARTIFICIALINTELLIGENCE
7. Mergi ng, Joi ni ng, and
Concat enat i ng
- Concatenating:
NAS.IO/ARTIFICIALINTELLIGENCE
- Merging:
- Joining:
NAS.IO/ARTIFICIALINTELLIGENCE
8. Worki ng wi t h Dat es
Pandas provides powerful functionalities for working with
dates.
- Convert to datetime:
NAS.IO/ARTIFICIALINTELLIGENCE
9. Fi l e I /O
Pandas can seamlessly read from and write to a variety
of file formats.
NAS.IO/ARTIFICIALINTELLIGENCE
Next Steps
1. Advanced Visualization Workshops: Dive deeper into the
intricacies of data visualization with hands-on workshops.
NAS.IO/ARTIFICIALINTELLIGENCE
Take Action Now
Delivery Hero SE This document is strictly confidential and may not be copied, used, made available or be disclosed to thirdparties without prior written permission.
NAS.IO/ARTIFICIALINTELLIGENCE
https://www.youtube.com/@decodingdatascience/
Delivery Hero SE This document is strictly confidential and may not be copied, used, made available or be disclosed to thirdparties without prior written permission.
NAS.IO/ARTIFICIALINTELLIGENCE
Join Our AI Community