Given the school result data, analyse the performance of the students on different parameters, e.g subject wise or class wise.

Class 12th CBSE IP Given the school result data, analyse the performance of the students on different parameters, e.g subject wise or class wise. Solution: –  import matplotlib.pyplot as plt Subject=[‘Physics’,’Chemistry’, ‘Hind”, Biology’, ‘ComputerSc’] Percentage=[85,78,65,90,100] plt.bar(Subject, Percentage, align=’center’,color=’green’) plt.xlabel(‘SUBJECTS NAME’) plt.ylabel(‘PASS PERCENTAGE’) plt.title(‘Bar Graph For Result Analysis’) plt.show() Fun & Easy to follow Works on […]

Write a program to Importing and Exporting data between pandas and CSV file.

Class 12th CBSE IP Write a program to Importing and Exporting data between pandas and CSV file. Solution: –  import pandas as pd df = pd.read_csv(“E:emp.csv”) print(df) l = [{‘Name’:’A’,’B’,’C’}, {‘Marks’:55,65,75}, {‘Grade’:’C’,’B’,’A’}] df1=pd.DataFrame(l) df1.to_csv(“f1.csv”) Fun & Easy to follow Works on all devices Your own Pace Super Affordable Popular Videos https://www.youtube.com/watch?v=9uOETcuFjbE UX for Teams Learn […]

Write a program to convert csv into a data frame and then display it.

Class 12th CBSE Write a program to convert csv into a data frame and then display it. Solution: –  import pandas as pd df= pd.read_csv(‘MelaSales.csv’) print(df) Fun & Easy to follow Works on all devices Your own Pace Super Affordable Popular Videos https://www.youtube.com/watch?v=9uOETcuFjbE UX for Teams Learn the basics and a bit beyond to improve […]

Considering the DataFrame created in Program 13 and present the sales of the east region

Class 12th CBSE IP Considering the DataFrame created in Program 13 and present the sales of the east region Solution: –  import matplotlib.pyplot as plt import pandas as pd dict1={‘north’:[110,150,230,400], ‘east’:[200,90,150,350] } df=pd.DataFrame(dict1, index=[‘April’,’May’,’june’,’July’]) print(df) df[‘east’].plot(kind=’barh’, color=[‘green’]) plt.title(“East Region Sales Month wise”,fontsize=14,color=”blue”) plt.xlabel(“Sales”,fontsize=14,color=”red”) plt.ylabel(“Month”,fontsize=14,color=”red”) plt.xticks(fontsize=10, rotation=30) plt.show() Fun & Easy to follow Works on all […]

Write a program to read details such as item sales made in a DataFrame and then store this data in a csv file.

Class 12th CBSE Write a program to read details such as item sales made in a Data Frame and then store this data in a csv file. Solution: –  import pandas as pd c={‘Fridge’:[12],’Cooker’:[5],’Juicer’:[15],’Iron’:[11]} df= pd.DataFrame(c) print(df) df.to_csv(‘file.csv’) Fun & Easy to follow Works on all devices Your own Pace Super Affordable Popular Videos https://www.youtube.com/watch?v=9uOETcuFjbE […]

Given a series s1 with some values in it. Write a program to sort the values in descending order and store in s2 object, sort in ascending order and store in s3 object, store the squares of the series in s3 object, store the squares of the series values in s4 object, display s4 object values which are >7.

Class 12th CBSE Given a series s1 with some values in it. Write a program to sort the values in descending order and store in s2 object, sort in ascending order and store in s3 object, store the squares of the series in s3 object, store the squares of the series values in s4 object, […]

Write a python program to create a DataFrame with custom column name/index.

Class 12th CBSE Write a python program to create a DataFrame with custom column name/index. Solution: –  import pandas as pd myList = [[‘Ashima’,12],[‘Mannat’,14],[‘Samidha’,15],[‘Jai’,16]] myDataFrame = pd.DataFrame(myList,columns=[‘Name’,’Roll No’]) print(myDataFrame) Fun & Easy to follow Works on all devices Your own Pace Super Affordable Popular Videos https://www.youtube.com/watch?v=9uOETcuFjbE UX for Teams Learn the basics and a bit […]

Write a python program to show the use of where condition using Series

Class 12th CBSE IP Write a python program to show the use of where condition using Series. Solution: –  import pandas as pd myDict= {1:10,2:20,3:30} myDict2= {1:’Ajay’,2:’Dheeraj’,3:’Shanku’} print(myDict) mySeries=pd.Series(myDict) mySeries2=pd.Series(myDict2) print(mySeries) print(mySeries.where(mySeries > 10)) print(mySeries.where(mySeries < 20)) print(mySeries.where(mySeries == 10)) print(mySeries.where(mySeries == 10,33)) print(mySeries.where(mySeries != 10,33)) print(mySeries2) print(mySeries2.where(mySeries2 == 'Ajay')) print(mySeries2.where(mySeries2 != 'Ajay')) print(mySeries2.where(mySeries2 == […]

sign up!

We’ll send you the hottest deals straight to your inbox so you’re always in on the best-kept software secrets.