7. Create a dataframe and iterate them over rows. Solution :- data = [["Virat",55,66,31],["Rohit",88,66,43],[ "Hardik",99,101,68]] players = pd.DataFrame(data, columns = ["Name","Match-1","Match-2","Match-3"]) print("Iterating by rows:") print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~") for index, row in players.iterrows(): print(index, row.values) print("Iterating by columns:") print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~") for index, row in players.iterrows(): print(index, row["Name"],row["Match-1"], row["Match-2"],row["Match-3"])
All computer course for class 9th to 12th with proper practical and theory .........