title: Unable to get TA-Lib or BTA-lib to work with Dataframe from Binance. How do you convert the Dataframe to work with TA-Lib?
body: <p>Thank you in advance for any help.  I have been trying to match the EMA/MACD on Binance for several months off and on.  I have tried several methods but the data never lines up with what is showing on the mobile app for the exchange.  I read they use TEMA rather then EMA and that the implementation of TA-Lib's MACD matches the exchange.  However I have been unable to figure out how to get it to read the Dataframe without giving an error.  I have only been programming in Python for a few months but this has stumped me the entire time.  If someone could please show me how to fix this. The technic version works with the Dataframe but it does not match the exchange. I have tried a bunch of things and errors range from no index to unable to convert.</p>
  <p>Regards, Jeff</p>
  <pre><code>import talib
  import btalib
  import numpy
  import pandas as pd
  import requests
  import time
  import json
  import technic as ta
  from datetime import datetime
  from os import system, name
  
  api_key = ''
  api_secret = ''
  from binance.client import Client
  client = Client(api_key, api_secret)
  sym = &quot;TKOUSDT&quot;
  while 1 == 1:
  
      data = client.get_historical_klines(sym, Client.KLINE_INTERVAL_5MINUTE, &quot;135 mins ago UTC&quot;)
      data2 = pd.DataFrame(data, columns = ['timestamp', 'open', 'high', 'low', 'close', 'volume', 'close_time', 'quote_av', 'trades', 'tb_base_av', 'tb_quote_av', 'ignore' ])
      clse = data2['close']
  #    print(clse)
      clse2 = clse.to_numpy()
  #    print(clse2)
      clse3 = pd.to_numeric(clse2, downcast='float')
  #    print(clse3)
  
      # This one works... Sorta... The values do not match the Binance exchange!  Was told Binance uses TEMA and that the TA-Lib MACD matches the exchange.
      macd1 = ta.tmacd(data2['close'], w_slow=26, w_fast=12, w_signal=9)
      print(macd1)
  
      # Will not read the Dataframe
      macd, signal, hist = talib.MACD(data2['close'], fastperiod=12, slowperiod=26, signalperiod=9)
  #    print(macd,signal,hist)
  
      # Will not read the Dataframe
      macd2 = btalib.macd(data2['close'], pfast=20, pslow=50, psignal=13)
  #    print(macd2)
      
      time.sleep(10)
  </code></pre>