Saturday, March 28, 2020

NPTEL Python for Data Science Week 4 Assignment 4 answers |2020|99.9% ac...





Code : Assignment 4 code in google drive. If you are downloading this file , please subscribe and like . Advance Thanks.

https://drive.google.com/file/d/1dOZ-YHLRCaSq_l7ffW3b2u5gAgnrUw9p/view


2020- NPTEL Python for Data Science Assignment 2 solutions| 100% correct...



Find the solutions\answers in this video for the below questions : 1)Which of the following sequence data type is defined by enclosing the elements in parentheses ‘()’? 2)Which of the following statement is not valid about Numpy ‘Arrays’? 3)The command to access the last element from the array “a” is__ import array as arr a = arr.array('d', [2.5, 3.5, 4.5]) 4)Create an array ‘x’ with values 0 to 9 and find what is the command to extract the elements in the following sequence - array ([5,3,1])? 5)What will be the output after executing the following codes? x=(0,8,9,15,17,18) y=slice(1,-2) 6)The method used to increase the length of the list by number of elements in its argument. 7)The function that returns the indices of the sorted elements. 8)Create two tuples tuple=(2,4,6,3,7) tuple1=(1,2,3) Find out which of the following code does not work on a tuple 9)The command to find the number of elements in the following array “N” is import numpy as np N=np.array([24, None , 29, 'str', np.nan, 23,20,(),[], ...]) 10)Which of the following is not a valid syntax for creating a Set ‘M’ in Python? M = set([11,12],[13,14],[14,15]) 11)What will be the output after executing the following codes? S={12,13,14,15} S.intersection_update({17,13,14,16}) print(S) 12)Which of the following command returns the set of all elements from both sets, a and b? 13)What will be the output of ndarray.ndim attribute? 14)For dictionary d = {“plum ":0.66, "pears ":1.25,"oranges ":0.50, “apple”:0.75 }, which of the following statement correctly updates the price of oranges to 0.90? 15)Which of the following command(s) is/are used to join arrays? 16)What will be the output of the dictionary ‘c’? 17)The output of the code given below is n = [x*x for x in range(4)] print(n) 18)The output of the code given below is list = [2, 4, 6, 8] a = (x**3 for x in list) print(next(a)) 19)Which of the following is not possible in sequence datatypes? 20)Which of the following commands will give you a new numpy array with Boolean values? ======================================================= Subscribe jaganInfo channel to get more related videos. Thanks for your support to make more videos. ========================================================

NPTEL Python for Data Science Assignment 3 answers | 2020 Week 3 |99.9% ...



1)Pandas features a number of functions for reading data as a DataFrame object. Which of the following commands are valid? 2)Which of the following is a valid indexing option with DataFrames? 3)Which of the following function allows the use of ‘Lambda expression’ while querying the data? 4)While reading comma-separated values (csv) file into DataFrame., which of the following will be used to set the first column as the index column? 5)Read the given dataset “Tips.csv” as a dataframe “Data”. Which of the following command(s) is/are correct to extract the columns in the following sequence - Time, TotalBill, Tips? 6)Read the given excel sheet ‘Tips1.xlsx’ as a dataframe ‘Data1’. Identify which of the following command (s) is/are correct to merge the two data frames ‘Data’ and ‘Data1’ by columns? 7)Copy the 'Data2' dataframe as 'Data3' (Data3 = Data2.copy()) and identify the command to find the total tips received across Day’s from the dataframe ‘Data3’? 8)Copy the 'Data2' dataframe as 'Data3' (Data3 = Data2.copy()) and find which of the following command (s) gives the count of the Time (‘Dinner' or 'Lunch') across gender? 9)Which of the following plot is a visual representation of the statistical five-number summary of a data? 10)Which of the following statement is not true about histograms? 11)If you have column with categorical variables, which will be the appropriate method to fill in the NaN’s present in the column? 12)Which of the following is not the right command to fill NaN values? 13)For the given dataframe “Data3” plot a histogram for the variable ‘TotalBill’ to check which range has the highest frequency 14)For the given dataframe “Data3” draw a bar chart for the variable “Day”. Identify the category with the maximum count 15)Find the mean of the ‘TotalBill’, ‘Tips’ and ‘Size’ across Days from the dataframe ‘Data3’? 16)On which day sum of the total bill was maximum? 17)What will be the output of ‘a’ and ‘b’? 18) n Pandas library, Dataframe class provides a member function to find duplicate rows based on all columns. Identify the right option. 19)What does the following command do? df.dropna(axis=0, how='all') ? 20)Correlation between two variables X&Y is 0.85. Now, after adding the value 2 to all the values of X, the correlation co-efficient will be --------------------- Practice Assignment 3 --------------------- 1) Which of the following can be inferred from scatter plot of ‘mpg’ (Miles per gallon) vs ‘wt’ (Weight of car) from the dataset mtcars.csv? Answer : a) As weight of the car increases, the mpg decreases 2) Plot a boxplot for “price” vs “cut” from the dataset “diamond.csv”. Which of the categories under “cut” have the highest median price? Answer : d) Fair 3) In the churn.csv dataframe, what are the total no. of missing values for the variable TotalCharges? Answer : c) 15 4) The command used for line plot from the package Matplotlib? Answer : a) plot() 5) The probability of two different events occurring at the same time is known as Answer : c) Joint probability

Sainik School 2020 Entrance Exam English Class 6 Question and Answers



This video contains solutions to All India Sainik School Entrance Exam 2020 class 6 for English Grammar questions with answers

You can get Sainik School Entrance Exam 2020 General knowledge questions from the below link:
https://youtu.be/EclZFjwdRTU

Sainik School Entrance Exam General Knowledge Class 6 Question and Answers

This video contains solutions to All India sainik school entrance exam 2020 class 6 for General knowledge questions. You can get Sainik School Entrance Exam 2020 English Grammar questions from the below link: https://youtu.be/JTX-lcfpg40 The following G.K questions answered in this video. Please watch , like and subscribe. 1) Which is biggest desert in the world? 2)Manas national park is located in the state of? 3)which of these grows from the roots ? 4)Sahyadris is also known as? 5)The gas filled in a weather balloons is 6)Growing children need more of 7)Which gas is dissolved under pressure in soft drinks? 8)who is the lowest ranked Air force officer among these 9) which of the following is a national festival 10)Dr.Amartya Sen won Nobel Prize in which field 11) The imaginnary line drawn half way between Nort Pole and South Pole 12) The largest Island in the world is 13) The coldest place in world, lying in the south frigid zone is 14) who invented telephone in 1876 15)'Ghoomar' is a popular folk dance of which of the folowing state 16)Black soil is also known as 17) PV sindhu is associated with which sports 18) The space programmer of Govt of india is looked after by 19) Bhakranangal project is built on the river 20) who is known as a Iron Man of India 21) The longest river in south india is 22) which planet is known as moorning star as well as evening star 23) which article of constitution provides indian citizen Right to Equality 24) Narora nuclear power plant is located in the state of 25) which of the following diseases spreads through contaminated food and water

Monday, March 23, 2020

Data Visualization using python libraries | matplotlib I Seaborn | plotl...





Visualization is any technique for creating images, diagrams, or animations to communicate a message.
Types of Data Visualizations :
Explanatory:
Exploratory:

Python Visualisation Libraries
• Matplotlib
o
https://matplotlib.org/
• Pandas built-in plotting
• ggpy
o
https://github.com/yhat/ggpy
• Altair
o
https://altair-viz.github.io/
• Seaborn
o
https://seaborn.pydata.org/
• Plotly
o
https://plot.ly/python/
• Bokeh
o
https://bokeh.pydata.org/en/latest/
• HoloViews
o
http://holoviews.org/
• VisPy
o
http://vispy.org/
• Lightning
o
http://lightning-viz.org/

Visualization methods :
Distribution
It is commonly used at the initial stage of data exploration i.e. when we get started with understanding the variable. Variables are of two types: Continuous and Categorical. For continuous variable, we look at the center, spread, outlier. For categorical variable we look at frequency table.
Histogram : It is used for showing the distribution of continuous variables.
Box-Plot : It is used to display full range of variation from min to max and useful to identify outlier values.
Comparison
It is used to compare values across different categories.
Common charts to represent these information are Bar and Line chart.
Bar Chart : It is used to compare values across different categories
Line Chart : It is used to compare values over quantitative variable
Composition
It is used to show distribution of a variable across categories of another variable
Pie Chart : It can be created by passing the values representing each of the slices of the pie.
Relationship
It is widely used to understand the correlation between two or more continuous variables
Scatter Plot : It clearly shows the relationship between two variables

Demo 1 : Basic Plot
import matplotlib.pyplot as plt
plt.plot([1,2,4],[5,7,4])
plt.show()

Demo 2 : Basic Plot Legend Title Labels
import matplotlib.pyplot as plt
x,y = [1,2,4],[5,7,4]
x2,y2 = [1,2,5],[8,11,5]
plt.plot(x,y, label = "Firstline")
plt.plot(x2,y2, label = "Secondline")
plt.xlabel('X-axis label')
plt.ylabel('Y-axis label')
plt.title('Graph Title')
plt.legend()
plt.show()

Demo 3 : Bar Chart
import matplotlib.pyplot as plt
x = [2,4,6,8,10]
y = [6,7,8,2,4]
x2 = [1,3,5,7,9]
y2 = [7,8,2,4,2]
plt.bar(x, y, label="FirstBar", color='lightblue')
plt.bar(x2, y2, label="SecondBar", color='c')
plt.xlabel('Bar Number')
plt.ylabel('Bar Height')
plt.title('Graph: Two Bars')
plt.legend()
plt.show()

Demo 4 : Hist Chart
import matplotlib.pyplot as plt
population_ages = [22,55,62,45,21,22,34,42,42,4,99,102,110,120,122,130,111,151,115,112,80,75,65,54,44,42,48]
bins = [0,10,20,30,40,50,60,70,80,90,100,120]
plt.hist(population_ages, bins , histtype='bar', rwidth=0.8)
plt.xlabel('X-axis')
plt.ylabel('Y-axis')
plt.title('Graph: Hist Chart')
plt.legend()
plt.show()

Demo 5 : Scatter Plot
import matplotlib.pyplot as plt
x = [1,2,3,4,5,6,7,8]
y = [5,2,4,2,1,4,5,2]
plt.scatter(x,y,label='skitcat', color='r',s=250)
# google matplotlib marker option
plt.scatter(x,y,label='skitcat', color='r',s=200, marker = '*')
plt.xlabel('X-axis')
plt.ylabel('Y-axis')
plt.title('Graph: Scatter Plot')
plt.show()

Demo 6 : Stack Plot
import matplotlib.pyplot as plt
days = [1,2,3,4,5]
sleeping = [7,8,6,11,7]
eating = [2,3,4,3,2]
working = [7,8,7,2,2]
playing = [8,5,7,8,13]
plt.plot([],[],color = 'm',label = 'sleeping')
plt.plot([],[],color = 'c',label = 'eating')
plt.plot([],[],color = 'r',label = 'working')
plt.plot([],[],color = 'y',label = 'playing') # linewidth
plt.stackplot(days,sleeping,eating,working,playing ,colors =['m','c','r','y'])
plt.xlabel('X-axis')
plt.ylabel('Y-axis')
plt.legend()
plt.title('Graph: Stack Plot')
plt.show()

Demo 7 : Pie Charts
import matplotlib.pyplot as plt
days = [1,2,3,4,5]
sleeping = [7,8,6,11,7]
eating = [2,3,4,3,2]
working = [7,8,7,2,2]
playing = [8,5,7,8,13]
slices = [7,2,2,13]
activities = ['sleeping','eating','working','playing']
cols = ['m','c','r','g']
plt.pie(slices, labels = activities, colors=cols)
# startangle , shadow= , explode , autopct
plt.title('Graph: Pie Chart')
plt.show()

Demo 8 : Load Data from Files
import numpy as np
x, y = np.loadtxt('DemoData.txt', delimiter=',', unpack=True)
plt.plot(x,y, label='Loaded from file!')
plt.xlabel('X-Axis')
plt.ylabel('Y-Axis')
plt.title('Graph : Load Data from File')
plt.legend()
plt.show()

Demo 9 : Live Graphs
import matplotlib.pyplot as plt
import matplotlib.animation as animation
from matplotlib import style
style.use('fivethirtyeight')
fig = plt.figure()
ax1 = fig.add_subplot(1,1,1)
def animate(i):
graph_data = open('DemoData.txt','r').read()
lines = graph_data.split('\n')
xaxis = []
yaxis = []
for line in lines:
if len(line) greaterthan 1:
x, y =line.split(',')
xaxis.append(x)
yaxis.append(y)
ax1.clear()
ax1.plot(xaxis,yaxis)
ani = animation.FuncAnimation(fig, animate, interval=1000)
plt.show()

Wednesday, March 18, 2020

Non proctored Solutions Python for Data Science Question and Answers

Non proctored Solutions Python for Data Science Question and Answers Download required datasets here : Session 1 Dataset : lending_data.csv https://drive.google.com/file/d/1hHOTQiEVNwqahnYFpp6M5Wgimd3ZYRN1/view Session 2 Dataset : microlending_data.csv https://drive.google.com/file/d/1d_l4XwXED_fqs_1zPeHL_1HC08HJi1n9/view **** PLEASE SUBSCRIBE ...LIKE ****** Non Proctored exam Preparation #jaganinfo #unproctored #nonproctored #nptel #pythonfordatascience #datascience Subscribe if you gain some information from this useful video. Python for Data Science - Non Proctored exam Question and Answers - Revision for Exam This video is explained and executed to get the solutions . All The Best for EXAM ... Note: This video is not responsible for any error or mistakes for your assignments. I have watched the NPTEL course related videos and read the content from different knowledge sources.