Lab 1 ML
Lab 1 ML
ipynb - Colaboratory
import pandas as pd
df = pd.read_csv("supermarketsales.csv")
print("First few rows of the dataset:")
print(df.head())
Payment Rating
0 Cash 8.0
1 Ewallet 7.3
2 Credit card 7.9
3 Cash 7.4
4 Cash 4.2
https://colab.research.google.com/drive/1wPr-x9-kma0doO2UknDmqGOj9sQ-15ZM#scrollTo=GEGiyS_jMHM2&printMode=true 1/2
1/11/24, 9:37 PM Untitled10.ipynb - Colaboratory
print("Data types of each column:")
print(df.dtypes)
https://colab.research.google.com/drive/1wPr-x9-kma0doO2UknDmqGOj9sQ-15ZM#scrollTo=GEGiyS_jMHM2&printMode=true 2/2