DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
fill a column based on values in another column pandas
df['Normalized'] = np.where(df['Currency'] == '$', df['Budget'] * 0.78125, df['Budget'])
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#fill
#column
#based
#values
#column
#pandas
ADD COMMENT
Topic
COMMENT
Name
6+4 =
Submit