get only first 10 columns anfas code example Example: get only first 10 columns pandas df.iloc[:, : 50]