data.to_sql('sample_table',mysql_engine, if_exists= 'replace', index = False)
When I run the above line, I get the error:

Why am I getting this? I am trying to write data to a mysql_db.
data.to_sql('sample_table',mysql_engine, if_exists= 'replace', index = False)
When I run the above line, I get the error:

Why am I getting this? I am trying to write data to a mysql_db.
Your data has a column 'Point_of_reference ' with a trailing space at the end that makes the name invalid.
To fix it, remove all trailing and leading whitespace from your column names:
data.columns = data.columns.str.strip()