You can simply create a string and pass it as an argument like this:
from_col = 'A'
to_col='O'
w_l = f"{from_col}:{to_col}" # 'A:O'
df = pd.read_excel(filepath, usecols=w_l)
CLICK HERE to find out more related problems solutions.
You can simply create a string and pass it as an argument like this:
from_col = 'A'
to_col='O'
w_l = f"{from_col}:{to_col}" # 'A:O'
df = pd.read_excel(filepath, usecols=w_l)
CLICK HERE to find out more related problems solutions.