import os.path
os.path.basename('home/robert/Documents/Workspace/datafile.xlsx')
os.path.splitext(os.path.basename(
    'home/robert/Documents/Workspace/datafile.xlsx'))[0]
How to get rid of extenstions from file basename using python