Pandas

 Pandas is an open source Python package that is most widely used for data science/data analysis and machine learning tasks. It is built on top of another package named Numpy, which provides support for multi-dimensional arrays.


What is a correct syntax to create a Pandas Series from a Python list?
pd.Series(mylist)               

Question 2:

What is a correct syntax to return the first value of a Pandas Series?

myseries[0]  

3.    What is a correct syntax to add the lables "x", "y", and "z" to a Pandas Series?

pd.Series(mylist, index = ["x", "y", "z"])       

Question 25:

What is a correct method to plot (draw) diagrams from the data in a DataFrame?

df.plot()  

Question 24:

What is a correct method to find relationships between column in a DataFrame?

df.corr() 

Question 23:

What is a correct method to discover if a row is a duplicate?

df.duplicate()    Your answer  
df.dup()
df.duplicated()  

Question 22:

What is a correct method to remove duplicates from a Pandas DataFrame?

df.remove_duplicates()    Your answer  
df.duplicates()
df.drop_duplicates()  

Question 18:

When using the Pandas dropna() method, what argument allowes you to change the original DataFrame instead of returning a new one?

dropna(original = True)    Your answer  
dropna(inplace = True)                                                                                

Comments