Font size
WorksheetsNetligent-1
Total questions: 75
Worksheet time: 1hrs 15mins
Which is true for series.
Size is mutable,Values is mutable
size is immutable,values is mutable
size is mutable,values is immutable.
none
Series.tail(3) will return how many values.
3 values from front
3 values from last
5 values
none
Series.head() will return how many rows.
2
3
4
5
To extract subset from Series,the following function is used
row()
column()
loc()
all
we can analyze the data in pandas with :
Series
Dataframe
Both
none
Series in Pandas is
1 Dimensional Array
2 Dimensional array
3 Dimensional array
none of above
Minimum number of argument we require to pass in pandas series ?
0
1
2
3
In data science, which of the python library are more popular ?
numpy
pandas
django
none
Which is not a feature of series
Homogeneous data
Immutable size
Mutable data
Multiple rows
Series can be created from
Array
Dictionary
Scatter value
All of them
Which package should be needed for series
Maths
Statistic
Pandas
Random
Full form of NaN is
Not a Null
Not a Number
Not a Numeric
None of these
Data structures in Pandas can be mutated in the terms of ____ but not of _____.
size, value
value, size
semantic, size
none of the above
pandas is a:
Data Structure
Series
Dataframe
Library
Write the output for the following:
import pandas as pd1
s = pd1.Series(5, index=[0, 1, 2, 3])
print(s)
0 5
0 5
1 5
2 5
3 5
dtype: int64
1 5
2 5
2 5
4 5
dtype: int64
0 5
1 5
2 5
3 5
dtype: object
write the output:
import pandas as pd1
s = pd1.Series([1,2,3])
t = pd1.Series([1,2,4])
u=s-t
print (u)
0 1
1 0
2 1
dtype: int64
0 0
1 0
2 1
dtype: int64
0 0
1 0
2 -1
dtype: float64
0 0
1 0
2 -1
dtype: int64
write the output:
import pandas as pd
s=pd.Series([1,2,3,4],index=['a','b','c','d'])
print(s.iloc[2:4])
b 2
c 3
d 4
dtype: int64
b 3
c 4
dtype: int64
c 3
d 4
dtype: int64
none of the above
write the output:
import pandas as pd
s=pd.Series([1,2,3,4],index=['a','b','c','d'])
print(s.loc['b':'d'])
b 2
c 3
d 4
dtype: float64
b 2
c 3
d 4
dtype: object
c 3
d 4
dtype: int64
b 2
c 3
d 4
dtype: int64
Pandas deals with following data structures
Series
Series and Data Frames
Series, DataFrames and Panel
None of Above
Best way to import the pandas module in your program ?
1.import pandas
2.import pandas as pd
3.from pandas import *
4.All of the above
DataFrame in pandas is
1. dimensional array
2. dimensional array
3.dimensional array
4.None of the above
All pandas data structures are ___ mutable but not always _______mutable.
a) size, value
b) semantic, size
c) value, size
d) none of the mentioned
Which of the following object you get after reading CSV file?
a) DataFrame
b) Character Vector
c) Panel
d) All of the mentioned
Which of the following library is similar to Pandas?
a) NumPy
b) RPy
c) SciPy
d) None of the mentioned
Which is not a feature of series
Homogeneous data
Immutable size
Mutable data
Multiple rows
Series can be created from
Array
Dictionary
Scaler value
All of them
Full form of CSV file is
Comma Separated Vault
Comma Separated Value
Common Separated Value
Common System Value
Not a function of Dataframe
Head()
Tail()
loc()
multi()
Dataframe can contain multiple series
True
False
Which function from the options given below can read the dataset from a large text file?
read_json
read_pickle
read_hdf
read_csv
Which of the following can be used to make a Dataframe?
Series
DataFrame
Structured ndarray
All of the above
Which is the correct Pandas syntax to read in a csv file and assign it to a DataFrame df?
df = read_csv('file.csv')
df = read('file.csv', type = 'csv')
df = pd.read_csv('file.csv')
df = with open('file.csv') as pd.DataFrame
Type the syntax that returns the top 5 rows in DataFrame df with the native Pandas function (not slicing):
(a)
Among the following functions, which one can be used to combine dataframes when they have similar structure.
combine_first
concat()
merge()
For the concat(), if the axis=1, it will join the dataframes ...............
vertically
horizontally
Which function can be used to combine dataframes based on common fields?
merge()
combine_first()
concat()
Which function views dataframe in the form of vertical subset ie column wise?
iterrows()
iteritems()
Which of the functions can be used to delete column/row from a DataFrame?
pop()
at()
drop()
iloc()
Which is not a feature of series
Homogeneous data
Immutable size
Mutable data
Multiple rows
Dataframe have
2D Array
Mutable size
Mutable data
All of above
Series can be created from
Array
Dictionary
Scatter value
All of them
Which package should be needed for series
Maths
Statistic
Pandas
Random
Full form of NaN is
Not a Null
Not a Number
Not a Numeric
None of these
Dataframe can be created using
Array
Dictionary
List
All of these
Full form of CSV file is
Comma Separated Vault
Comma Separated Value
Common Separated Value
Common System Value
Not a function of Dataframe
Head()
Tail()
loc()
multi()
which functions used to transfer data from dataframe to CSV files
to_data()
to_csv()
df_csv()
from_dataframe()
Dataframe can contain multiple series
True
False
The maximum number that you can assign for the color is ____.
4
3
2
1
This is an example of a ___________.
Scatter Chart
Line Graph
Bar Graph
Pie Chart
The maximum number that you can assign for the color is ____.
4
3
2
1
Which function is used to assign the title of the graph ?
name()
title()
heading()
none
names = np.array(["Reem" , "Salah" , "Haya" , "Maryam" , "Fatema"])
print(names([2))
Mark the right output from the below options
[ 'Haya' ]
[ 'Maryam' ]
[ 'Reem' ]
[ 'Salah' ]
names = np.array(["Reem" , "Salah" , "Haya" , "Maryam" , "Fatema"])
names[2] = "Omar"
print([names])
Mark the right output from the below options
[ "Reem" , "Salah" , "Haya" , "Maryam" , "Fatema" ]
[ "Reem" , "Salah" , "Omar" , "Maryam" , "Fatema" ]
[ "Reem" , "Haya" , "Salah" , "Maryan" , "Fatema" ]
names = np.array(["Reem" , "Salah" , "Haya" , "Maryam" , "Fatema"])
names[2] = "Omar"
print([names])
Mark the right output from the below options
[ "Reem" , "Salah" , "Haya" , "Maryam" , "Fatema" ]
[ "Reem" , "Salah" , "Omar" , "Maryam" , "Fatema" ]
[ "Reem" , "Haya" , "Salah" , "Maryan" , "Fatema" ]
names = np.array(["Reem" , "Salah" , "Haya" , "Maryam" , "Fatema"])
print(names([2))
Mark the right output from the below options
[ 'Haya' ]
[ 'Maryam' ]
[ 'Reem' ]
[ 'Salah' ]
What does these 4 colour boxes on extreme right side called
Title
Legend
Heading
Label
________________function is used to create a horizontal bar chart.
barchart()
barh()
bar()
None of the above
Among the following which chart type is used to visualize a trend in data over intervals of time.
Histogram
Bar chart
Pie chart
Line chart
The ______ argument of legend() provides the location for legend, which by default is one or upper right
Title()
Loc
X label()
Y label()
The graphical or visual representation of information and data using visual elements like charts, graphs, etc are called_____
Data visualization
Pyplot
Line chart
Bar chart
Name the function used to create an array?
np.aray()
np.array()
Np.array()
np.arange()
np.arange(2,8,1) ----> what output will be produced?
2,3,4,5,6,7,8
2,3,4,5,6,7,8,9
2,3,4,5,6,7
2,4,6,8
Which function is used to create a pie chart in Matplotlib?
plt.pie()
plt.piechart()
plt.chart()
plt.pieplot()
How can you explode a slice in a pie chart to emphasize it?
Use the explode parameter in plt.pie()
Use the highlight parameter in plt.pie()
Use the slice parameter in plt.pie()
Use the accent parameter in plt.pie()
What does the plt.scatter() function do?
Creates a line plot
Creates a scatter plot
Creates a histogram
Creates a pie chart
Which function in Matplotlib can be used to customize the size of points in a scatter plot?
plt.scatter()
plt.plot()
plt.bar()
plt.hist()
How can you add a legend to a scatter plot?
plt.legend()
plt.add_legend()
plt.show_legend()
plt.insert_legend()
Which function is used to create a violin plot in Matplotlib?
plt.violin()
plt.boxplot()
plt.violinplot()
plt.plot()
What does the c parameter in plt.scatter() control?
Which parameter in plt.pie() defines how much each slice is exploded from the center?
explode
offset
separation
dist
If n is the total number of observations, the class whose cumulative frequency is greater than 2n This class is called the median
TRUE
FALSE
The wickets taken by a bowler in 10 cricket matches are as follows: 2,6,4,5,0,2,1,3,2,3 Find the mode of the data
2
3
4
5
Can the mean, median and mode of data coincide?
Yes
No
The mean, median and mode of grouped data are always different
TRUE
FALSE
