pandas drop extension name from list of files

df.names = df.names.str.split('.').str.get(0)

Here is what the above code is Doing:
1. We’re using the .str accessor to access the string methods on the names column.
2. We’re using the .split() method to split the names column on the period character.
3. We’re using the .str.get() method to extract the first element of the resulting list.
4. We’re assigning the result back to the names column.