How to send the python DataFrame output to MS teams in Table format.

All other Source.Python topics and issues.
Nagesh Pindi
Junior Member
Posts: 1
Joined: Sun Sep 27, 2020 9:04 am

How to send the python DataFrame output to MS teams in Table format.

Postby Nagesh Pindi » Tue Sep 29, 2020 5:42 am

Hi Team,
How to send the python DataFrame output to MS teams in Table format. Please help me on this.

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)

DataFrame Output:
Attachments
MicrosoftTeams-image.png
MicrosoftTeams-image.png (21.39 KiB) Viewed 4308 times

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 42 guests