a guest Feb 17th, 2020 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import pandas as pd
  2. logs = pd.read_csv('/datasets/logs.csv')
  3. logs['email'] = logs['email'].fillna(value='')
  4. logs=logs[logs['source']=="None"].replace("None", "email")
  5. print(logs['source'].value_counts('None')) #возвращает 1.0 - получается одно значение "None" есть
  6. none = logs[logs['source']=='None'] #датафрейм, где в столбце  source есть значение "None"
  7. print(none) #возвращает пустой dataframe
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand