pandas drop extension name from dataframe with files code example Example: pandas drop extension name from list of files df.names = df.names.str.split('.').str.get(0)