Member-only story
Pandas — quick reference for the busy data scientist
( Pandas snippets that I find useful for day to day tasks )
I want this guide to be a no-nonsense and quick reference sheet to refresh your data munging skills in pandas. So let’s dive into pandas directly.
Note: You can play around with any dataset you like.
Quick Pandas Vocabulary:
dataframe: Two-dimensional structure of data similar to a spreadsheet
series: One-dimensional indexed array of fixed data type
First, let’s load pandas
import pandas as pd
url = “https://raw.githubusercontent.com/jokecamp/FootballData/master/Germany/Bundesliga/1964/matches.csv"
- You can load data from the internet without downloading
data = pd.read_csv(url)
data.head()
(Note: tail() command picks rows from tail, also you can pass numerical parameters to head and tail commands)
Some of the exploratory data analysis(EDA) commands you can try with pandas:
# print column names
data.columns# print general…