SQL results to MS Teams using Python

Hi Team,
Have wrote a small python script to send results to MS teams , when am try to sending it coming as string format.
My Code:

import pymsteams
import pandas as pd
import numpy as np
import pyodbc
from tabulate import tabulate

server = ‘ServerName’
database = ‘DBName’
username = ‘username’
password = ‘pasword’
conn = pyodbc.connect(‘DRIVER={ODBC Driver 17 for SQL Server};SERVER=’+server+’;DATABASE=’+database+’;UID=’+username+’;PWD=’+ password)

cursor = conn.cursor()

sql_query = “select * from bookingStatusEnum”

df = pd.read_sql(sql_query, conn)

#print(tabulate(sql_query))
def sleeve(df):
df.to_html()

myTeamsMessage = pymsteams.connectorcard("my webhook url ")
myTeamsMessage.title(“List Of Booking Status”)
#myTeamsMessage.text(“Test Mail”)
myTeamsMessage.text(df.to_string())
myTeamsMessage.send()

My Results:

I need results in table format. Please help on ASAP

Thanks

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

Hi Team,
Please help on above issue.