bytearray instead of regular string value <p>I am loading data from one table into pandas and then inserting that data into new table. However, instead of normal string value I am seeing bytearray.</p> <p><code>bytearray(b'TM16B0I8')</code> it should be <code>TM16B0I8</code></p> <p>What am I doing wrong here? </p> <h2>My code:</h2> <pre><code>engine_str = 'mysql+mysqlconnector://user:pass@localhost/db' engine = sqlalchemy.create_engine(engine_str, echo=False, encoding='utf-8') connection = engine.connect() th_df = pd.read_sql('select ticket_id, history_date', con=connection) for row in th_df.to_dict(orient="records"): var_ticket_id = row['ticket_id'] var_history_date = row['history_date'] query = 'INSERT INTO new_table(ticket_id, history_date)....' </code></pre>