Imagine I have an excel file with the name LP_Elements_Shocked_202108160517.xlsx
I would like to pull out this specific part of the file name and store it as an integer 20210816
The pattern is consistent. All files begin with LP_Elements_Shocked_ and then are followed by the eight digits I need. And then there will always be 4 more digits I do not need after those
Here is what I have so far:
import pandas as pd
pd.read_excel('LP_Elements_Shocked_202108160517.xlsx')