removing whitespaces from pandas dataframe csv

df = pd.read_csv('dataframe', sep = '\s*,\s*', engine = 'python')

Here is what the above code is Doing:
1. We’re using the read_csv function from pandas to read in the CSV file.
2. We’re using the sep argument to tell pandas that the comma is our delimiter.
3. We’re using the engine argument to tell pandas that we’re using Python’s built-in CSV module to parse the CSV file.