You are on page 1of 3

These are a few fundamental concepts in python to start with.

Now talking about the


larger package support in anaconda, we can work with a lot of libraries. Let’s take a look
at how we can use python anaconda for data analytics.

Use Case – Analytics

These are certain steps involved in data analysis. Let’s take a look at how data analysis
works in anaconda and various libraries that we can use.

Collecting Data

The collection of data is as simple as loading a CSV file in the program. Then we can
make use of the relevant data to analyze particular instances or entries in the data.
Following is the code to load the CSV data in the program.

1 import pandas as pd
2 import numpy as np
3 import matplotlib.pyplot as plt
4 import seaborn as sns
5  
df  = pd.read_csv('filename.csv')
6 print(df.head(5))
7
Slicing And Dicing

After we load the data set in the program, we must filter the data with a few changes like
eliminating the null values and unnecessary fields that may cause ambiguity in the
analysis.

Following is an example of how we can filter the data according to the requirements.

1 print(df.isnull().sum())
2 #this will give the sum of all the null values in the dataset.
3 df1 = df.dropna(axis=0 , how= 'any')
#this will drop rows with null values.
4

We can drop the null values as well.


BoxPlot

1 sns.boxplot(x=df['Salary Range From'])


2 sns.boxplot(x=df['Salary Range To'])

You might also like