Search the Blog

Sunday, September 15, 2019

Data Science Sample example for Beginner

Data Science Complete  Example with Library Pandas and Matplotlib :-

Sample Data Frame for Data Analysis in juypter with library pandas matplotlib

Learning of data Science is very easy for developer  and IT backgroud people beacuse they knows about programming mathodolgy and syntax in various other language. As java have its own set of rules for execute the program in the same way python have its own.

In this post i will explain about the code regarding to plot the data of company for april 1st week sales graph. To demonstrate that i have designed my own data set and save that data in CSV File.

Basic requirement to run this program and code are following

1- Python
2- Juypter Notebook
3- pandas 
4- matplotlib
5- dataset (In my case it is CSV File)

Python 

 I have installed Python 3.7. If you are new please download that first.


Note:- Download the python from anaconda site and download distribution version, Because with distribution version all required library will be installed, User don't need to download that separately.


To Check python is installed correctly please open cmd and run the following command.

C:\Users\HP>python
python insatllation testing

When you run the command then it will show you the currently installed version of python in your system.


Opening of Jupyter Notebook

Open the CMD and run the following command

C:\Users\HP>jupyter notebook

jupyter notenook opening via cmd prompt

Now the Screen will look Like This

Jupyter userr interface

Now The Complete Code is-
Step 1:- Defining of Pandas Lib, Numpy Lib
Defining of Pandas Lib, Numpy Lib

Step 2:- Reading the CSV File. In this Case i have the location of                  CSV File is same as of my jupyter directory
Reading the CSV File python pandas


Step 3:- Defining the Name of Columns
Defining the Name of Columns

Step 4:- Printing of read data.
Printing of read data pandas matplotlib python

Step 5:- Definng of matplotlib 
Step 6:- Creating the plot parameter 
Creating the plot parameter

Step 7:- Running of Final Code.

Thursday, September 12, 2019

pip installtion on window 10

5 Semple Steps to install pip in Window 10

I decide to write this post after facing the issue when i am not able to download libarary via cmd in pythan. Becuase what problem i faced a lot of new begineer will face this issue.

Step 1:- Check your python download folder. In my case it is in F drive. Copy the path

Pip Installtion window 10 python step 1


Copied URL in my case is :-                F:\python-3.7.4.exe


Note i have downloaded the version    Python 3.7.2

python environment setting for pip

Step 2:- Now open advance environment settings and create a new varible in path with the name of your python version.

   In My Case it was                             c:\python37\Scripts

Note:- python varible will be according to version of python may be possible you have downloaded someother versions also

pythan setup opening via cmd


Save the environment varible and Restart the System

Step 3:- Open cmd and paste following cmd

                                                            F:\python-3.7.4.exe TargetDic:C\Python37

pythan set reconfigure of pip


Step 4:- it will Ask to install some packeges do all and save.


pythan pip installation guide


Step 5:- now close the cmd and open again and run

                                       pip                                                             

Pip Complete istalation in Python



Wednesday, September 4, 2019

Python pattern from from incresing and descresing sequnce of numbers

This post will explain the logic, code and Syntax for pattern program in Python Programming. In this post you will understand how to right the code of a pattern which have the sequence in  descreasing and incresinng sequence.


Python pattern from from incresing and descresing sequnce of numbers


 Pattern Code-
def python_pattern(n):
    for i in range(0, n):
        if n/2 >= i:
            for j in range(1, i+1):
                print(j, end=" ")
            print("\r")
        else:
            for j in range(1, n - i + 1):
                print(j, end=" ")
            print("\r")
n=10python_pattern(n)

Output:
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
1 2 3 4
1 2 3
1 2
1

Youtube Video of Complete Program


See Also-Python patthern program of all types


Translate