Note
Pandas (19) 본문
728x90
How to calculate the number of characters in each word in a series?
# Input
ser = pd.Series(['how', 'to', 'kick', 'ass?'])
# Solution
ser.map(lambda x: len(x))
#output
0 3
1 2
2 4
3 4
dtype: int64
'Pandas' 카테고리의 다른 글
Pandas (21) (0) | 2022.08.12 |
---|---|
Pandas (20) (0) | 2022.08.11 |
Pandas (18) (0) | 2022.08.09 |
Pandas (17) (0) | 2022.08.08 |
Pandas (16) (0) | 2022.08.07 |
Comments