0% found this document useful (0 votes)
27 views3 pages

Experiment 1

Uploaded by

mail.ravishek
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views3 pages

Experiment 1

Uploaded by

mail.ravishek
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Experiment 1

Aim-Introduction to Python, operations in Python.

Theory-Python is a high-level, interpreted programming language that allows you to perform a wide
range of operations on different data types such as numbers, strings, lists, dictionaries, and more.
Some of the basic operations in Python include:

1. Arithmetic Operations: You can perform basic arithmetic operations such as addition,
subtraction,
multiplication, and division on numbers in Python using the following symbols:
+ # Addition
- # Subtraction
* # Multiplication
/ # Division
% # Modulo (returns the remainder of a division operation)
** # Exponentiation
// # Floor Division (returns the integer part of the division result)

Here's an example code that demonstrates arithmetic operations:


2. String Operations: You can perform different operations on strings such as concatenation, slicing,
and formatting.

Here are some examples:


Experiment 2
Aim-

Write a Python program to do the following operations:

Library: Pandas

a) Loading data from CSV file

b) Compute the basic statistics of given data - shape, no. of columns, mean

c) Splitting a data frame on values of categorical variables

d) Indexing of the data.

e) Display top 10 rows of data

Theory- Pandas is an open-source Python library that is used for data manipulation and analysis. It
provides data structures and functions for working with structured data such as spreadsheets,
databases, and other tabular data formats.

The two main data structures in Pandas are Series and DataFrame. A Series is a one-dimensional
array-like object that can hold any data type, such as integers, floats, strings, and Python objects. A
DataFrame is a two-dimensional tablelike data structure that consists of rows and columns, where
each column can have a different data type.

Pandas provides a wide range of functions for data manipulation, such as filtering, selecting, joining,
merging, and grouping data. It also has built-in functions for data cleaning, transformation, and
analysis, such as handling missing data, calculating summary statistics, and visualizing data.

Pandas is widely used in data science, machine learning, finance, and other fields that deal with large
amounts of structured data. It is an essential tool for data preprocessing, exploratory data analysis, and
data visualization.

You might also like