Python SQL Practice Questions
Python SQL Practice Questions
Data: {'Name': ['Aman', 'Riya', 'Sahil', 'Tina'], 'Age': [23, 21, 22, 20], 'Score': [90, 85, 88, 92]}
b. Add a column named "Passed" with values based on Score > 80.
X = [1, 2, 3, 4, 5]
3. SQL Queries
d. Write a query to update the price of the book "Python Basics" to 350.
a. Write a program to create a text file "sample.txt" and write "Hello, this is a sample file" into it.
a. Using Pandas, create a DataFrame from a CSV file and display the first 5 rows.
b. Write a program to group the DataFrame data by a specific column and display the mean of
another column.
---