internship task 1 includes pandas library The task is based on most of the fundamental themes of python and the pandas library. The task consist of some fundamental questions here are the subtasks: TASK 1: 1.Create an inner function to calculate the addition in the following way • Create an outer function that will accept two parameters ‘a’ and ‘b’ • Create an inner function inside an outer function that will calculate the addition of ‘a’ and ‘b’ • At last, an outer function will add 5 into addition and return it 2. Given input String of combination of the lower and upper case ,arrange characters in such a way that all lowercase letters should come first. 3. Given a Python list, remove all the even number from the list and save those even number in another list and print both the lists. For a given input list: List1 = [1,2,3,4,5,6,7] Output : List1=[1,3,5,7] List2 = [2,4,6] 4. Get the key corresponding to the minimum value from the following dictionary using appropriate python logic. sample={ ‘physics’, 88 , ‘maths’, 75, ’chemistry’ , 72,’Basic electrical’ , 89 } 5. Given two Python sets, update first set with items that exist only in the first set and not in the second set . S1={1,2,3,4,5,6,7,8,9} S2={1,3,4,6,8,11,22,34,51,67} 6. Program to create simple calculator in Python which on input of 1,2,3,4 should add , subtract , multiply and divide respectively.
PANDAS: This classic dataset contains the prices and other attributes of almost 54,000 diamonds. It's a great dataset for beginners learning to work with data analysis and visualization. Download the data set and solve the following: Source : https://www.kaggle.com/shivam2503/diamonds
- Write a Pandas program to read a csv file from a specified source and print the first 5 rows
- Write a Pandas program to select a series from diamonds DataFrame. Print the content of the series.
- Write a Pandas program to calculate count, minimum, maximum price for each cut of diamonds DataFrame.
- Write a Pandas program to check the number of rows and columns and drop those row if 'any' values are missing in a row of diamonds DataFrame.
- Write a Pandas program to count the duplicate rows of diamonds DataFrame.
- Write a Pandas program to get sample 75% of the diamonds DataFrame's rows without replacement and store the remaining 25% of the rows in another DataFrame