Assignment 5
Assignment 5
Write a Pandas program to create and display a one-dimensional array-like Object containing an
array of data.
2. Write a Pandas program to convert a Panda module Series to Python list andit's type.Create a series
with random function and apply the above mentioned application.
3. Write a Pandas program to add, subtract, multiple and divide two Pandas Series. Series [2, 4, 6, 8,
10], [1, 3, 5, 7, 9]
5. Write a Pandas program to convert a NumPy array to a Pandas series. NumPy array: d1 = [10, 20, 30,
40, 50].
6. Write a Pandas program to convert the first column of a Data Frame as a Series. The items are:--
{'col1': [1, 2, 3, 4, 7, 11], 'col2': [4, 5, 6, 9, 5, 0], 'col3': [7, 5, 8, 12, 1,11]}
7. Write a Pandas program to convert a given Series to an array. List is ['100', '200', 'python', '300.12',
'400']
8. Write a Pandas program to sort a given Series. ['100', '200', 'python', '300.12', '400'
9. Write a Pandas program to select rows from a given Data Frame based on values in some columns.
Data Frame col1 col2 col3
0147
1458
2369
3470
4581
1458
3470
10. Write a Pandas program to remove white spaces, left sided whites paces and right sided white spaces
of the string values of a given pandas series.
11. Write a Pandas program to create and display a Data Frame from aspecified dictionary data which
has the index labels. Data Frame:
'qualify': ['yes', 'no', 'yes', 'no', 'no', 'yes', 'yes', 'no', 'no', 'yes']}
labels = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']
12. Write a Pandas program to select the specified columns and rows from a given Data Frame .Select
'name' and 'score' columns in rows 1, 3, 5, 6from the following data frame. Data Frame:
'qualify': ['yes', 'no', 'yes', 'no', 'no', 'yes', 'yes', 'no', 'no', 'yes']}
labels = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j
13. Write a Pandas program to create the mean and standard deviation of the data of a given Series.
14. Write a Pandas program to get the items of a given series not present in another given series..
15. Write a Pandas program to get the items which are not common of two given series.
16. Write a Pandas program to compute the minimum, 25th percentile, median, 75th, and maximum of a
given series.
17. Write a Pandas program to calculate the frequency counts of each unique value of a given series.
18. Write a Pandas program to display most frequent value in a given series and replace everything else
as 'Other' in the series.
19. Write a Pandas program to find the positions of numbers that are multiples of 5 of a given series.
20. Write a Pandas program convert the first and last character of each word to upper case in each word
of a given series.
21. Write a Pandas program to compute difference of differences between consecutive numbers of a given
series.