lab 1 vansh
lab 1 vansh
Introduction
Library:
library, traditionally, collection of books used for reading or study, or the building or room in
which such a collection is kept. The word derives from the Latin liber, “book,” whereas a
Latinized Greek word, bibliotheca, is the origin of the word for library in German, Russian, and
the Romance languages. bray, traditionally, collection of books used for reading or study. word
derives from the Latin liber, “book,” whereas a Latinized Greek word, bibliotheca, is the origin
of the word for library in German, Russian, and the Romance languages.
Pandas:
Pandas is a Python library for data analysis. Started by Wes McKinney in 2008 out of a
need for a powerful and flexible quantitative analysis tool, pandas has grown into one of
the most popular Python libraries. It has an extremely active community of contributors.
Pandas is built on top of two core Python libraries—matplotlib for data visualization
and NumPy for mathematical operations. Pandas acts as a wrapper over these libraries,
allowing you to access many of matplotlib's and NumPy's methods with less code. For
instance, pandas' .plot() combines multiple matplotlib methods into a single method,
enabling you to plot a chart in a few lines.
Before pandas, most analysts used Python for data munging and preparation, and then
switched to a more domain specific language like R for the rest of their workflow.
Pandas introduced two new types of objects for storing data that make analytical tasks
easier and eliminate the need to switch tools: Series, which have a list-like structure,
and DataFrames, which have a tabular structure.
Pandas’ tutorials
Here are some analysis-focused pandas’ tutorials that aren't riddled with technical
jargon.
Pandas’ cookbook (Julia Evans) - This tutorial uses real-world data and presents
a problem to solve or question to answer in every example. Great for putting
pandas' capabilities in context of the actual analytical workflow.
Practical Data Analysis with Python (Anita Reichard) - Provides code examples
for four specific analytical tasks: data munging, aggregation, visualization, and
time series analysis.
[VIDEO SERIES] Easier data analysis in Python with pandas (Data School) - A
series of video tutorials for pandas’ newbies who know some Python. Each video
answers a student-posed question using real-world data.
An Introduction to Pandas (Michael Hansen) - This tutorial covers the basics of
pandas with a complete analysis of weather data—from reading in data to
creating charts.
Modern Pandas (Tom Augspurger) - An intermediate tutorial for experienced
Python users looking to stay sharp on pandas.
Steps:
Importing pandas-
Csv method:
Csv (command seprated values) is a widely used file format storing is a widely
simple text-based formats that represent in a table-like structure using plain text,
with each line in the file corresponding to a row of the table and each value seprated
by a deliminter(commonly a comma)
Printing dataset: