Question: 2.3) [6 points) Suppose that we define a dataframe as shown below: people - { 'id': (1,2,3,4,5,6,7] 'first': ['Ali', 'Melisa', None, Mehmet', 'Veli', 'Esin', 'Ayse'),

 2.3) [6 points) Suppose that we define a dataframe as shown

2.3) [6 points) Suppose that we define a dataframe as shown below: people - { 'id': (1,2,3,4,5,6,7] 'first': ['Ali', 'Melisa', None, Mehmet', 'Veli', 'Esin', 'Ayse'), 'last': ['Genc', 'Sen', "Yilmaz', 'Kacar', None, None, 'Yasar'] ) af - pd. DataFrame (people) 2.3a [3 points]) Complete the one line code below to drop rows which contain any missing values: af - df.... 2.3b [3 points]) After dropping which values in the id column will be kept? 2.4) [4 points] Give a regular expression that can extract Visa and Mastercard credit card numbers from a string. A Visa credit card number is any sequence of 16 digits that starts with a 4, and a Mastercard is any sequence of 15 digits that starts with 5. Assume there are no dashes or other extra characters in a credit card number. For example, your regex should match 4123713131673827 and 5612512165638672. Just give the regex pattern, no need to write regex functions. 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!