Question: Task: Figure out whether or not the missing values in the traffic source column are random. Check if every row with the source None has

Task: Figure out whether or not the missing values in the traffic source column are random.

Check if every row with the source None has an email specified. We do so by applying two filters to the logs DataFrame:

  1. The traffic source, 'source', equals None.
  2. The email column value is an empty string, ''.

Print the results of the query. If it returns an empty DataFrame, then our hypothesis was correct.

Hint: Here, you'll need to use Boolean indexing with these two conditions: (logs['source'] == 'None') & (logs['email'] == ''). Code: import pandas as pd

logs = pd.read_csv('/datasets/logs.csv') logs['email'] = logs['email'].fillna(value='')

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!