DataFrame
and Series
The difference between having multiple columns or not.
DataFrame [" column name "]
returns Series
.
Series.map ()
and DataFrame.applymap ()
map ()
and ʻapplymap ()are element-by-element applications. For
Series.map (), specify
na_action =" ignore "when applying to a table with NaN. Also, as an additional function, if you enter dictionary type or
Series instead of function, you can replace" NY "to" New York "(not in
DataFrame.applymap () `).
Series.apply ()
and DataFrame.apply ()
DataFrame.apply ()
is processed for each item or column (select with ʻaxis`). For example, use this when you want to use multiple columns of elements when processing each item.
There are few reasons to use Series.apply ()
over Series.map ()
except in special cases.