0% found this document useful (0 votes)
25 views

IP Pract Question With Solution

The document contains questions about pandas and SQL. It includes questions about printing DataFrame columns and rows, creating DataFrames from lists and dictionaries, sorting and filtering Series, importing/exporting csv files, and SQL queries for creating tables, inserting/deleting rows, updating values, and ordering results.

Uploaded by

rushgaming9696
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

IP Pract Question With Solution

The document contains questions about pandas and SQL. It includes questions about printing DataFrame columns and rows, creating DataFrames from lists and dictionaries, sorting and filtering Series, importing/exporting csv files, and SQL queries for creating tables, inserting/deleting rows, updating values, and ordering results.

Uploaded by

rushgaming9696
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

1. Write a program to print a DataFrame one column at a time and print only first 3 column.

2. Write a program to print a DataFrame one row at a time and print only first 5 rows.
3. Write a program to create a DataFrame to store weight, age and name of 3 people. Print the
DataFrame and Transpose it.
4. Write a program to create a Series and change the indexes of the series object with any random
order.
5. Write a program to create a series object temp1 that stores temperatures of seven days in it.
Take any random temperature.

6. Create a pandas series from a dictionary of values and a narray.


7. Write a program to create a series object with 6 random integer and having indexes as
p,q,r,s,t,v.

8. Write a program to sort the values of a series object s1 in ascending order of its values and store
it into series object s2.
9. Create a DataFrame for exam result and display row labels, column label datatypes of each
column and dimensions.
10. Write a program to create pandas DataFrame using list of lists.

11. Write a program to create dataframe from dictionary of lists.


12. Write a program to Reindex the pandas dataframe.

13. Write a python program to convert a dictionary to pandas series.


14. Write a program to convert numpy array to pandas series.

15. Write a program to sort any given series.


16. Write a program to replace all the missing values in a dataframe with a number 999.
17. Write a program to find the sum and average of each column in a DataFrame.

18. Write a program to import and export data from pandas and csv files.
19. Write a program to create a histogram.
20. Write a python program to create a line chart.

21. Write a python program to create a bar chart.


22. Given the school result data,analyse the performance of 5 students on different parameter, e.g.
subject wise
MYSQL Questions:

1. Create a student table with student id,name and marks as attributes where the student id is the
primary key

2. Insert the details of new student in the above table

3. Delete the details of a students in the above table.

Query: Delete from table where studentid=004;

4. Use select command to get the details of students with marks more than 80
5. Find the min,max,sum,and average of the marks in a student mark table

6. Write a SQL query to order the (student ID,marks) table in descending order of the marks.

7. Write a SQL query to change marks of student to 600 whose student id is 03,if the existing marks
is less than 400.

8. Write a SQL query to add column salary to country table


9. Write a SQL query to rename the table country to customer.

10. Write a SQL query to change the Salary of customer table with 250000 for all customer

11. Write a SQL query to change salary of customer with 1250000 fro those customer whose
country is ‘Australia’
12. Delete the details of a students in the above table.

13. Write a SQL query to order the (student ID,marks) table in descending order of the marks.

You might also like