I have a data set that looks like this (see below). I want to create a new column that that holds the value 'NASA' when 'NASA' appears in the 1st column either by itself or as part of a larger string. How can I do this for a pandas data frame in python?
Thanks!
index | selection |
---|---|
NASA- 16 | 51 |
NASA- 12 | 39 |
NASA- 8 | 38 |
NASA- 13 | 38 |
NASA- 9 | 34 |
NASA- 10 | 32 |
NASA- 15 | 30 |
NASA- 14 | 28 |
NASA- 17 | 27 |
NASA- 18 | 26 |
1990 NASA group | 25 |
NASA- 11 | 23 |
NASA Astronaut Group 8 | 20 |
NASA- 5 | 19 |
NASA- 19 | 18 |
NASA-8 | 18 |
NASA-9 | 16 |
1978 NASA group | 15 |
1996 NASA group | 15 |
TsPK-8 | 15 |
NPOE-4 | 15 |
TsPK-2 | 14 |