← Back to list

Getting started with Pandas

The blog includes all the the information that you should know about pandas such as what is Pandas, why we use Pandas, Applications of…

kabir · 2023-03-02 18:17 · 0 claps · 2.2 min read
#pandas-in-python
Open on Medium ↗

Getting started with Pandas

The blog includes all the the information that you should know about pandas such as what is Pandas, why we use Pandas, Applications of Pandas, how to install pandas, some examples etc.

pandas

pandas

What is pandas?

Pandas is a Python library used for working with data sets.

It has functions for analyzing, cleaning, exploring, and manipulating data.

It is fast and it has high-performance & productivity for users.

Why use pandas?

Pandas allows us to analyze big data and make conclusions based on statistical theories.

Pandas can clean messy data sets, and make them readable and relevant.

For example, say you want to explore a dataset stored in a CSV on your computer. Pandas will extract the data from that CSV into a DataFrame — a table, basically — then let you do things like:

  • Calculate statistics and answer questions about the data, like
  • What’s the average, median, max, or min of each column?
  • Does column A correlate with column B?
  • What does the distribution of data in column C look like?
  • Clean the data by doing things like removing missing values and filtering rows or columns by some criteria
  • Visualize the data with help from Matplotlib. Plot bars, lines, histograms, bubbles, and more.
  • Store the cleaned, transformed data back into a CSV, other file or database

Application of Pandas

Setup and Installation

Let’s get Pandas installed in the System.

pip install pandas

the latest version of Pandas is 1.5.3 released on Jan 19,2023.

Load data into Pandas

with Pandas, we can load data from different sources such as from CSV file or remote URL or from database.

the loaded data is stored in pandas as Data Frame. usually refered as variable df .

From CSV File

import pandas
df = pandas.read_CSV("Path to csv file") # you can use the filename.csv if the file is present in the folder you are working on.

From Remote URL

import pandas
df = pandas.read_csv("remote/url/path/pointing/to/csv")

Create Data Frame

import pandas as pd

data = {
  "calories": [420, 380, 390],
  "duration": [50, 40, 45]
}

#load data into a DataFrame object:
df = pd.DataFrame(data)

print(df)

output

output

Examples of Pandas :

Add a list of names to give each row a name :

import pandas as pd

data = {
  "calories": [420, 380, 390],
  "duration": [50, 40, 45]
}

df = pd.DataFrame(data, index = ["day1", "day2", "day3"])

print(df)

Locate a row

print(df.loc["day2"])

Load a comma separated file (CSV file) into a DataFrame:

import pandas as pd

df = pd.read_csv('data.csv')

print(df) 

For more information and operations on panda you can visit the given link. Also you will find some amazing real life example **Pandas.**

-Kabir Navadiya and Dhaval Patel


메타데이터
post_id
e54d4c60fddb
slug
getting-started-with-pandas-e54d4c60fddb
url
https://medium.com/@21ce080/getting-started-with-pandas-e54d4c60fddb
canonical_url
https://medium.com/@21ce080/getting-started-with-pandas-e54d4c60fddb
author_url
https://medium.com/@21ce080
status
ok
fetched_at
2026-08-02 19:17:18