Make a file named pandas_series.py or pandas_series.ipynb for the following exercises.
Given ["kiwi", "mango", "strawberry", "pineapple", "gala apple", "honeycrisp apple", "tomato", "watermelon", "honeydew", "kiwi", "kiwi", "kiwi", "mango", "blueberry", "blackberry", "gooseberry", "papaya"]
-
Create a pandas series called
fruitsto hold the above data. -
Run
.describe()on the series to see whatdescribereturns for a series of strings. -
Run the code necessary to produce only the unique fruit names.
-
Determine how many times each value occurs in the series.
-
Determine the most frequently occurring fruit name from the series.
-
Determine the least frequently occurring fruit name from the series.
-
Write the code to get the longest string from the
fruitsseries. -
Find the fruit(s) with 5 or more letters in the name.
-
Capitalize all the fruit strings in the series.
-
Count the letter "a" in all the fruits (use string vectorization)
-
Output the number of vowels in each and every fruit.
-
Use the
.applymethod and a lambda function to find the fruit(s) containing two or more"o"letters in the name. -
Write the code to get only the fruits containing "berry" in the name
-
Write the code to get only the fruits containing "apple" in the name
-
Which fruit has the highest amount of vowels?