0

So I'm working with a Telegram Bot which get data from SQL query and send the results to people.

I have tried to manual format the data return by the query but its not at my expectation. I also tried to use the Markdown and HTML parse mode of Telegram but did not success.

So I now I want to transform the query's results into a Dataframe (I have already did this), then how I can send the dataframe to telegram bot in python?

If sending a dataframe is not possible, then is there any better ways to do this?

Thank you so much for your time!

  • 1
    I also used the telegram bot in python and also had some issues at the beginning. Can you share some code and data to better understand what your goal is? https://stackoverflow.com/help/how-to-ask – Night Train Jun 19 '20 at 08:52

1 Answers1

0

Your best bet is to either to either generate an ASCII table, or an image of the table from your dataframe. In my experience, generating an image was the only way to always get a well formatted table on all clients.

Felipe Zavan
  • 1,654
  • 1
  • 14
  • 33