allign the header after styling a dataframe code example
Example: align columns to left pandas python
df.style.set_properties(subset=["col1", "col2"], **{'text-align': 'right'})
df.style.set_properties(subset=["col1", "col2"], **{'text-align': 'right'})