output only last column in dataframe python code example Example: get last column pandas df.iloc[:,-1:]