<jupyter_start><jupyter_text>Questions 1:How to import pandas and check the version?<jupyter_code>import pandas as pd
print(pd.__version__)<jupyter_output>1.0.5<jupyter_text>Questions 2:How to create a series from a numpy array?<jupyter_code># importing Pandas & numpy 
import pandas as pd 
import numpy as np 
  
# numpy array 
values = np.array(['a', 'b', 'c', 'd', 'e']) 
  
# creating series 
series_value = pd.Series(values) 
print(series_value)<jupyter_output>0    a
1    b
2    c
3    d
4    e
dtype: object<jupyter_text>Questions 3:How to convert the index of a series into a column of a dataframe?<jupyter_code>import pandas as pd 
  
data = {'Roll Number': ['CSBS05597', 'CSBS05598', 'CSBS05599', 'CSBS05600'], 
                   'Name': ['Madhav', 'Mayank', 'Shoham', 'Ujjwal'], 
                   'Marks In Percentage': [98, 89, 69, 78], 
                   'Grade': ['A+', 'A', 'B', 'B+'], 
                   'Subject': ['Maths', 'Maths', 'Maths', 'Maths']}

df = pd.DataFrame(data) 
  
# Printing the dataframe  
df<jupyter_output><empty_output><jupyter_text>Questions 4:Write the code to list all the datasets available in seaborn library.Load the 'mpg' datasetNote: mpg dataset will be read from seaborn module in the manner sir has already shown(provided in thematerials folder)<jupyter_code># importing seaborn
import seaborn as sns


mpg = sns.load_dataset('mpg')

print(mpg)<jupyter_output>mpg  cylinders  displacement  horsepower  weight  acceleration  \
0    18.0          8         307.0       130.0    3504          12.0   
1    15.0          8         350.0       165.0    3693          11.5   
2    18.0          8         318.0       150.0    3436          11.0   
3    16.0          8         304.0       150.0    3433          12.0   
4    17.0          8         302.0       140.0    3449          10.5   
..    ...        ...           ...         ...     ...           ...   
393  27.0          4         140.0        86.0    2790          15.6   
394  44.0          4          97.0        52.0    2130          24.6   
395  32.0          4         135.0        84.0    2295          11.6   
396  28.0          4         120.0        79.0    2625          18.6   
397  31.0          4         119.0        82.0    2720          19.4   

     model_year  origin                       name  
0            70     usa  chevrolet chevelle malibu  
1            70     usa      [...]<jupyter_text>Questions 5:Which country origin cars are a part of this dataset?<jupyter_code># importing seaborn
import seaborn as sns
# importing pandas with alias name
import pandas as pd

# loading the dataset from seaborn
mpg = sns.load_dataset('mpg')

# creating a dataframe
df = pd.DataFrame(mpg)

# Displaying the country origin from where cars belong
df.origin.unique()<jupyter_output><empty_output><jupyter_text>Questions 6:Extract the part of the dataframe which contains cars belonging to 'usa'<jupyter_code># importing seaborn
import seaborn as sns
# importing pandas with alias name
import pandas as pd

# loading the dataset from seaborn
mpg=sns.load_dataset('mpg')

# creating a dataframe
df = pd.DataFrame(mpg)

# Displaying the part from dataframe where cars belong to "usa"
df[df['origin'].str.contains("usa")]<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09388379204892966, 'fraction_numerical': 0.07706422018348624, 'mean_word_length': 1.9844890510948905, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '634196', 'license': 'Apache-2.0', 'n_tokens_mistral': 1222, 'n_tokens_neox': 1066, 'n_words': 334, 'path': 'Assignment-day-4.ipynb', 'repo_name': 'Madhav2204/LetsUpgrade-Data-Science-Python', 'size': '3270'}