What do you want to save?
Add Code snippet
New code examples
-
Python 2021-09-13 00:06:03
pandas where
# replaces values with other where condition is False DataFrame.where(cond, other=nan, inplace=False, axis=None, level=None, errors='raise', try_cast=False) import pandas as pd df = pd.DataFrame({'values':[1,2,3,4]}) df.where(df['values'] % 2 == 0, -1)... Add solution
Best helpers
Ranking is empty