Q. The sales table of company databse of MySQL stores the sales records of 100 salesmen. Write a program to load only those records in datafrem which have made sales more than of Rs 50000/- .


Answer :-

import mysql.connector as a

db=a.connect(user='root',passwd='0000000000' ,host='localhost',database='company')
import pandas as pd
df=pd.read_sql(f'select * from sales where sales>50000',db)

print(df)

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post