I am trying to send a pandas dataframe on a channel on slack using the following small script:
import requests
URL = 'XXXXXX'
response = requests.post(
URL, data={dataframe}
)
But when I do that I have the following error message: 'DataFrame' objects are mutable, thus they cannot be hashed! I also tried to send it as a json but then it is unreadable for the users. Any idea on how to do this properly? thanks!
My dataframe looks at follow:
Bot instance Current Potential profit Potential Profit 24h ago Change last 24h Volume 24h Volume Market
0 Biki - TECUSDT 21.69386074 USDT 21.60458081 USDT 0.08927993 USDT 0.84554375 USDT 28577.2565559176490500
1 Binance - XEMBTC -3.55974813 BTC -3.55514961 BTC -0.00459852 BTC 11.31867593 BTC 924.7716585800000000
2 Binance - XEM/ETH -15.38320177 ETH -15.32533185 ETH -0.05786992 ETH 35.44241506 ETH 1273.2456803600000000
3 bitfinex ant/btc 1.64774952 BTC 1.65615563 BTC -0.00840611 BTC 0.01056552 BTC 5.2507294117379079
4 Bitfinex ANT/ETH -15.93635190 ETH -15.60342681 ETH -0.33292509 ETH 0.00000000 ETH 99.3832923859608600
And when I send it to slack as a json it looks like this:
{"Bot instance":{"0":"Biki - TECUSDT","1":"Binance - XEMBTC","2":"Binance - XEM/ETH","3":"bitfinex ant/btc","4":"Bitfinex ANT/ETH","5":"Bitfinex ANT/USD","6":"Bitfinex ODE/BTC","7":"Bitfinex ODE/USD","8":"Bitfinex - RIFBTC","9":"Bitfinex - RIFUSD","10":"Bitfinex - VLD/USD","11":"Bittrex ANT/BTC","12":"Bittrex ANT/ETH","13":"Bittrex - GBYTEBTC","14":"Bitvavo - ANT/EUR","15":"Coinall - RIFBTC","16":"Coindeal - PHT/ETH","17":"Coinmetro - PRQEUR","18":"Hitbtc ANTBTC","19":"Hitbtc - PLBTBTC","20":"Hitbtc - PLBTETH","21":"Hitbtc - PLR/BTC","22":"Hitbtc - PLR/ETH","23":"Hitbtc - PLR/USDT","24":"Kucoin - RIFBTC","25":"LGO - LGOUSD","26":"Liquid - RIFUSD","27":"Livecoin - PLBTBTC","28":"Livecoin - PLBTETH","29":"Livecoin - PLBTUSD","30":"Nash - ANTBTC","31":"Poloniex - PRQUSDT","32":"P2PB2B - ANTBTC"},"Current Potential profit":{"0":"21.69386074 USDT","1":"-3.55974813 BTC","2":"-15.38320177 ETH","3":"1.64774952 BTC","4":"-15.93635190 ETH","5":"-22533.4891602 USD","6":null,"7":"-163.0524
Which is not readable for users