Author Archive Slide Scope

BySlide Scope

Exploratory Data Analysis of Coronavirus COVID-19 Dataset using Python Pandas

Sample Code Files for Project of Exploratory Data Analysis of Corona Virus Dataset using Python Pandas

recovered = pd.read_csv(‘https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_19-covid-Recovered.csv’)

confirmed = pd.read_csv(‘https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_19-covid-Confirmed.csv’)

deaths = pd.read_csv(‘https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_19-covid-Deaths.csv’)

BySlide Scope

Digital Marketing Course for Startup Business in Lucknow

Nowadays digital marketing is important for every business whether it’s a large organization or any small scale startup. We are offering our new syllabus specially oriented for emerging startups. We understand the need of Digital Marketing Course for Startup, it requires high mileage in a very short time. Be it online reputation management on internet or local business listings we’ve covered each aspects that it needs. Our startup oriented course will cover the following aspects of digital marketing:-

Module 1

  1. Introductions
    1. Introduction to Internet
      1. Understanding what is internet, IP address, MAC address, Etc.
      2. Understanding Domain, Hosting DNS, Nameserver, etc
  • Introduction to cPanel of hosting.
  1. How to host domain
  2. What is static and dynamic website
  3. Introduction to E-Commerce websites and marketing.
  1. Introduction to marketing strategies.
    1. Understanding demographics
    2. How to reach audience
  • Optimization of campaigns
  1. Inbound Marketing
    1. Search engine optimized article writing
    2. Maintaining SEO Score
    3. Maintaining Readability Score.
  2. Graphic Designing
    1. Creating attractive images and graphics for websites and online promotion activities.
  3. Introduction to HTML Tags for SEO
    1. Important tags of <head>
    2. Important tags of <body>
    3. Open Graph tags
    4. Twitter cards tags
    5. Schema markup
  4. Local Business Listings : Google | Bing
  5. Search engine Submissions: Google | Bing | Yandex.
  6. Website designing through WordPress
  7. Social Media Marketing
    1. Facebook Page management and Ads
    2. Twitter Promotion strategies and Ads
    3. Instagram Business promotion and Ads
    4. LinkedIn Profile and Ads
  8. Youtube Promotion.
  9. Discussion forum management
  10. Business directory listings
  11. Classified ad listings
  12. Google Adwords ad setup
    1. Search Ad
    2. Display Ad
    3. Video Ad
  13. Google Analytics analysis

We will train you on these all tools and strategies of digital marketing. The above mentioned are done with the help of tools, and some with analytical approach. In Digital Marketing Course for Startup, branding is done on both quantitative as well as qualitative methods.

 

 

Fees: INR 19999/-(Nineteen thousand, Nine hundred, ninty-nine only).

Offer Price: INR 9999/-(Nine thousand, Nine hundred, ninty-nine only).

Duration: 3 Months

Contact :

Rachit Srivastava

9696820568

8004875217

 

 

 

 

 

 

 

BySlide Scope

K means clustering algorithm example using Python

K Means Clustering is an algorithm of Unsupervised Learning. You can apply this algorithm on datasets without labeled output data.Only Input data is there an we have a goal of finding regularities in data to group or cluster like items together.

You can copy the code an run it line by line in Jupyter Notebook.

Watch the videos given in the bottom of this post to understand the process clearly.

What is a Cluster – Datapoints aggregated together because of certain similarities


import numpy as np
import matplotlib.pyplot as plt
# Import the algorithm from scikitlearn https://scikit-learn.org
from sklearn.cluster import KMeans
# Get the dataset of wine https://archive.ics.uci.edu/ml/datasets/wine
names = ['Class', 'Alcohol', 'Malic acid', 'Ash', 'Alcalinity of ash', 'Magnesium', 'Total phenols', \
'Flavanoids', 'Nonflavanoid phenols', 'Proanthocyanins', 'Color intensity', 'Hue', 'OD280/OD315',\
'Proline'] data = pd.read_csv('https://archive.ics.uci.edu/ml/machine-learning-databases/wine/wine.data', names = names)
data.head(100)
data['Class'].value_counts().plot(kind='bar')
data.plot.scatter(x = 'Alcohol', y = 'OD280/OD315', figsize=(8,5))



data.plot.scatter(x = 'Alcohol', y = 'OD280/OD315', c= 'Class', figsize=(8,5), colormap='jet')
data.iloc[:,[12,1]].head()
# kmeans = Kmeans().fit(data)
# kmeans = KMeans(n_clusters = 2)
# kmeans.fit(X)
# kmeans.cluster_centers_
# kmeans.labels_
kmeans = KMeans(n_clusters=3, init = 'random', max_iter = 1, random_state = 5).fit(data.iloc[:,[12,1]])


centroids_df = pd.DataFrame(kmeans.cluster_centers_, columns = list(data.iloc[:,[12,1]].columns.values))
fig, ax = plt.subplots(1, 1)
data.plot.scatter(x = 'Alcohol', y = 'OD280/OD315', c= kmeans.labels_, figsize=(12,8), colormap='jet', ax=ax, mark_right=False)
centroids_df.plot.scatter(x = 'Alcohol', y = 'OD280/OD315', ax = ax, s = 80, mark_right=False)
kmeans = KMeans(n_clusters=3, init = 'random', max_iter = 150, random_state = 5).fit(data.iloc[:,[12,1]])
centroids_df = pd.DataFrame(kmeans.cluster_centers_, columns = list(data.iloc[:,[12,1]].columns.values))
fig, ax = plt.subplots(1, 1)
data.plot.scatter(x = 'Alcohol', y = 'OD280/OD315', c= kmeans.labels_, figsize=(12,8), colormap='jet', ax=ax, mark_right=False)
centroids_df.plot.scatter(x = 'Alcohol', y = 'OD280/OD315', ax = ax, s = 80, mark_right=False)

k means clustering with centroid
What is K means clustering ?
You can watch the theory here :

Applying K means clustering on wine dataset :

BySlide Scope

How to plot Boxplot in Python

A box plot is used to visualize 5 values in a dataset for the selected column(s):

  • Minimum Value
  • First Quartile or 25%
  • Median (Second Quartile) or 50%
  • Third Quartile or 75%
  • Maximum value

Box Plot is also known as Box and Whisker Plot.

Steps –

    1. Load the dataset using Pandas dataframe
  1. Select any column to visualize
  2. Plot boxplot using Pandas
    OR
  3. Plot boxplot using Seaborn

Python Code :

import pandas as pd

#load data

data = pd.read_csv(‘insurance.csv’)

data.head(10)

how to plot boxplot in pandas

>> data.describe()

statistics in python pandas

# In pandas boxplot one attribute, column is required to plot boxplot
# Column can take name of one column of the dataset or the list of columns
data.boxplot(column=[‘age’],figsize=[10,7])

# We can group data as well.

data.boxplot(column=[‘age’], by=[‘gender’], figsize=[10,7])

Boxplot Using Seaborn Library

BySlide Scope

Magento Website ka Seo kaise kare

How to do SEO of a magento website

Go to this URL where there is a demo of magento

139.162.47.20/magento23/admin

And follow the instructions in this video :

BySlide Scope

मशीन लर्निंग क्या है

मशीन लर्निंग क्या है

मशीन लर्निंग एक ऐसी तकनीक है जिसमे कंप्यूटर को इस तरह से प्रोग्राम किया जाता है की वो इनपुट डाटा के आधार पे खुद से आउटपुट डाटा को प्रेडिक्ट कर सके | दिए गए इनपुट के आधार पे खुद से सीख सके |
सॉफ्टवेयर डेवलपमेंट में जरुरत के आधार पे प्रोग्राम बनाया जाता है | मशीन लर्निंग में मशीन किसी इंसान की तरह आर्टिफिशियल इंटेलिजेंस का इस्तेमाल करके टास्क को खुद से करने की काबिलियत सीखती है |

मशीन लर्निंग आर्टिफिशियल इंटेलिजेंस विषय के अंदर आती है |

मशीन लर्निंग के प्रकार –

  • सुपरवाईस्ड लर्निंग
  • अन्सुपरवाईस्ड लर्निंग
  • रीइंफोर्स्मेंट लर्निंग
BySlide Scope

Maths Module in Python Language

How to Import Maths Module in Python

Maths module is already included with python installation.

To import any module in your program you must use:

import <modulename>

To import Math module write:

>>>import math

Example

>>> print(pi)

NameError: name ‘pi’ is not defined

>>> import math

>>> print(math.pi)

3.141592653589793

>>> print(pi)

NameError: name ‘pi’ is not defined

We must use math. before calling any method or variable of math module.

>>> math.factorial(5) # To calculate factorial

120

>>> math.e

2.718281828459045

BySlide Scope

Typecasting in Python – Changing Data Types in Python

Typecasting in Python

It is the process of changing one datatype to another data type.

Functions used to do typecasting.

str(x) – To change x to string

int(x) – To change x to integer ( x must be float or bool but not complex or string)

float(x) – To change x to float ( x must be int or boolean)

complex(x) – To change x to complex number. ( x must be numeric or bool)

bool(x) – To change values to True or False ( 1 is true and 0 is False )

Here x is the variable which has to be typecasted.

>>>X = “15” # Here x is string

>>>type(X)

<class ‘str’>

>>> print(int(X))

15 # X is now integer

 

BySlide Scope

Taking User Input in Python Language

How to Take User Input in Python

We can take user input in python using the console window or we can also create GUI using python.

To create GUI windows in Python we use a library or module called Tkinter.

To take user input in python using console window we use and built in function called:

input()

Example:

name = input(“Enter Name”)

# Here name is the variable where we want to store of the value which user will enter in the console screen.

“Enter Name” is an instruction to user.

input() function creates string values only.

Example :

name = input(“Enter Name”)

pwd = input(“Enter Password”)

if(name==”Mohan”):

            print(“Welcome Mohan”)

if(pwd==”123″):

            print(“Your Password is correct”)

else:

            print(“You are not mohan”)

 

Exercise : Create a program in python to calculate the area of a triangle.

a=float(input(“enter a in cm”))

b=float(input(“enter b in cm”))

c=float(input(“enter c in cm”))

s=(a+b+c)/2

print(“area is ” ,(s*(s-a)*(s-b)*(s-c))**0.5, “cm^3”)

input()

BySlide Scope

Comparison Operators in Python Language

Comparison Operators

In programming comparison operators are used to compare two or more values. These are comparison operators used in Python.

  1. Equals To – “==”

To check whether one value is equal to other value.  The answer is returned in Boolean format.

Example:

>>> name = “Mohit”  # Assignment

>>> name == “Mohit”  # Comparison

True  # Output

>>> x = 5  # Assigment

>>> 5 == x  # Comparsion – LHS is equal to RHS here

True

 

*Use of If Condition

Syntax of if

if(condition):

            statement

Example

>>> name = “Ramesh”

>>> if(name == “Ramesh”):

#indentation block

print(“Welcome Ramesh Babu”)

Welcome Ramesh Babu  #output

  1. Greater than: “ > “

>>> x = 67

>>> if(x > 65):

            print(x, ” is greater than 65″)

67 is greater than 65

Example with With if and else :

x = 68

if(x > 65):

            print(x , ” is g t 65 “)

else:

            print(x , ” is ngt 65 “)

# 68 is g t 65

  1. Greater than or equal to

Example :

>>> t = 678   # assignment

>>> t >= 789 # comparison

False              # output

>>> t >= 678

True

>>> t >= 677

True

  1. Less Than

>>> cb = 56

>>> cb < 45

False

  1. Less than or equal to

>>> cb = 56

>>> cb <=  56

True

>>> cb <=  78

True