extract first letter of column python

Solutions on MaxInterview for extract first letter of column python by the best coders in the world

showing results for - "extract first letter of column python"
Curtis
04 Apr 2016
1df['new_col'] = df['First'].astype(str).str[0]
2df
3
4Out[29]:
5   First  Second new_col
60    123     234       1
71     22    4353       2
82     32     355       3
93    453     453       4
104     45     345       4
115    453     453       4
126     56      56       5