intermediate#python#pandas#data analysis
Data Analysis with Pandas in Python
Learn how to use the Pandas library in Python for data analysis, including data frames, series, and data manipulation.
Introduction to Pandas
Pandas is a powerful library in Python for data analysis and manipulation.
Data Frames
A data frame is a two-dimensional table of data with rows and columns.
import pandas as pd
data = {'Name': ['John', 'Anna', 'Peter', 'Linda'],
'Age': [28, 24, 35, 32],
'Country': ['USA', 'UK', 'Australia', 'Germany']}
df = pd.DataFrame(data)
print(df)
Data Series
A data series is a one-dimensional table of data.
import pandas as pd
data = pd.Series([1, 2, 3, 4, 5])
print(data)
Data Manipulation
You can manipulate data in a data frame using various methods.
import pandas as pd
data = {'Name': ['John', 'Anna', 'Peter', 'Linda'],
'Age': [28, 24, 35, 32],
'Country': ['USA', 'UK', 'Australia', 'Germany']}
df = pd.DataFrame(data)
df['Age'] = df['Age'] + 1
print(df)
Keep going with python
Ready for more? These paid resources pick up where this lesson leaves off.
UdemyBestsellers
Top-rated python courses
Project-based python video courses — the perfect paid next step after these free lessons.
Browse on Udemy →AmazonReader picks
Best python books
Hand-picked python books to master the fundamentals offline.
See on Amazon →Some links on this page are affiliate links: we may earn a commission at no extra cost to you. We only recommend tools we believe are genuinely useful.