Python Data analytics Algorithm
Data Analysis Algorithm Step By Step(EDA)-
Import The Library- Below are the libraries we need to import before analysing or loading the dataset. Pandas is very powerful library and everyone who wants to analyse data must learn python pandas. Seaborn, Matplotlib are used for visualising the dataset. There are few more python libraries to visualize the data but seaborn and matplotlib are widely used. Click Here
Exploratory Data Analysis(EDA)-
👉Click Here
Exploratory data analysis is a method of analysing and visualizing the data before modeling. It's nearly impossible to see the data columns and decide the important correlation and features of dataset. EDA have been made to complete this tediuos task
Import Dataset- To import dataset pandas library is used. Below codes are required as per type of dataset. Mostly in industry either the dataset is in form of excel or in csv or data is importing from mysql db.
It's possible you need to export the data from MYSQL,
just comment down I will provide the code and process :).
Checking the header whether the dataset has been loaded perfectly or not, This function return the first n rows of the dataframe.
It will show the first 5 rows of
the dataset. If you want to check the last few rows of dataset then you can use
df.tail().
Next, we need to check the data info. It might be possible that the data is not in correct format.
Often you will find that data is in object format instead of date or integer/float. You need to change the data format in that condition.
👉Click Here
If the column need to change in string or integer then (Code Respectively)-
Check again the data info
df.info() #to cross validate that columns have been changed into required data format
Identify Null Values -
Check whether there is null data in dataset. Use following code-
It will give you whether the
dataframe has the null values or not.
Suppose that you found some null values in dataframe. In this condition below process need to take.
1. Handling Missing Data
This is very important part of data analysis. Based on % missing data we decice to drop or fill the dataframe. If the dataset has large missing data in any column then we need to fill the data.
👉Click Here
To fill with particular value or if if you required to fill by forward data then use below code. Forward fill is used when we need to fill the rows with just above rows value.
For filling the Integer data, usually mean median are used, still we need to check first the standard deviation of the data. If the standard deviation is close to 1, we can fill the missing data with mean/median.
Majorly you have to decide what you have to do with data whether need to fill or drop.
Mode- To fill string data- suppose that you have few option in string for example male, female, or businessman, employee, etc. In this condition user need to fill data using mode.
**Now you have completed the task of data cleaning/Filling. And your data is ready for analysis.
👉
Click Here
2. Handling Missing Data - Droping the null values-Again data join is also very important, If you have more than 1 data set and you want to join the dataset into one dataframe then joins required. use the following code to join the two dataframe with a common column.
Once the join completed, we mostly use these commands to analyse further-
Group by Calculation–
Transpose –
Some time we need to transpose the dataframe, It has very simple syntax-
Transpose = df.T
print(Transpose)
👉Click Here
Data Visualization –
For data visualization I would recommend to use seaborn library, This library has easy syntax and most of the time it provides the direct output while in matplotlib so many manipulation required.
Bar chart –
Sns.barplot(x = ‘column1’, y = ‘columns2’ , data = dataframe, palette = ‘plasma’)
Catplot –
sns.catplot(x = ‘column1’, y = ‘column2’ , hue = ‘column3’ , data = df)
Countplot –
sns.countplot(x = ‘column_name’, data = df)
Click Here
Soon I will share Data analysis projects based on Kaggle data.
If you want to learn data science fill the form availale in below link
Stay Tuned
Thank You
Comments
Post a Comment
If You have any doubt please let me know