DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
create new column using dictionary padnas
U 111 112 112 d = {112: 'a', 111: 'b'} df['B'] = df['A'].map(d) df Out[248]: A B 0 111 a 1 112 b
PREVIOUS
NEXT
Tagged:
#create
#column
#dictionary
#padnas
ADD COMMENT
Topic
COMMENT
Name
7+6 =
Submit