#!/usr/bin/env python # coding: utf-8 # In[1]: import pandas as pd pd.options.display.max_colwidth = 500 # In[2]: df = pd.read_csv(r'examples/test.csv', sep='\n', skiprows=[0], names=['Description']) df.index = list(range(1, 22)) # In[3]: def f1(x): x = x.split(' ') return x.pop(0) df['Argument'] = df['Description'].map(f1) # get the first word # In[4]: def f2(x): x = x.split(' ') return " ".join(x[1:]) df['Description'] = df['Description'].map(f2) # remove the first word # In[5]: df = df.reindex(columns=['Argument', 'Description']) # In[6]: df