Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- data = pd.read_csv('/datasets/projects.csv')
- #df.loc[(df.a < 0), 'a'] = 0 # пример с сайта
- # https://pythobyte.com/pandas-dataframe-replace-values-in-column-based-on-condition-be51b498/
- #пробую заменить значения NaN на плюсы, используя пример в строке 5
- data.loc[(data.'Новая функция' == NaN), 'Новая функция'] = '+'
- print(data)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement