title: Why am I getting Empty Dataframe message when using concat
body: <p>I am trying to view the predicted price for MSFT and I am referring to a book titled 'Machine learning and data science blueprints for finance'. It provides a sample code as a case study to determine the future stock price of MSFT. The code is below. However, when I start debugging it, the terminal shows the following message</p>
  <pre><code>Empty DataFrame
  Columns: [MSFT_pred, GOOGL, DEXJPUS, DEXUSUK, SP500, DJIA, VIXCLS, MSFT_DT, MSFT_3DT, 
  MSFT_6DT, MSFT_12DT]
  </code></pre>
  <p>The code is below</p>
  <pre><code>from pandas_datareader import data
  import yfinance as yf
  import pandas_datareader as web
  import numpy as np
  import pandas as pd
  
  return_period = 5
  
  stk_tickers = ['MSFT','AAPL','GOOGL']
  
  stk_data = yf.download(stk_tickers, start = '2012-01-01', end='2017-01-01')
  
  
  ccy_tickers = ['DEXJPUS','DEXUSUK']
  ccy_data = web.DataReader(ccy_tickers,'fred')
  
  
  idx_tickers = ['SP500','DJIA','VIXCLS']
  idx_data = web.DataReader(idx_tickers,'fred')
  
  
  Y = np.log(stk_data.loc[:, ('Adj Close', 'MSFT')]).diff(return_period).shift(-                
  return_period)
  Y.name = Y.name[-1]+'_pred'
  
  X1 = np.log(stk_data.loc[:, ('Adj Close', ('GOOGL', 'IBM'))]).diff(return_period)
  X1.columns = X1.columns.droplevel()
  X2 = np.log(ccy_data).diff(return_period)
  X3 = np.log(idx_data).diff(return_period)
  
  X4 = pd.concat([np.log(stk_data.loc[:, ('Adj Close', 'MSFT')]).diff(i) for i in     
  [return_period, return_period*3, return_period*6, return_period*12]],     
   axis=1).dropna()
  X4.columns = ['MSFT_DT', 'MSFT_3DT', 'MSFT_6DT', 'MSFT_12DT']
  
  X = pd.concat([X1, X2, X3, X4], axis=1)
  
  
  dataset = pd.concat([Y, X], axis=1).dropna().iloc[::return_period, :]
  Y = dataset.loc[:, Y.name]
  X = dataset.loc[:, X.columns]
  print(dataset)
  </code></pre>
  <p>I know the data is present because when I print 'X' or 'Y' it shows up with it. It must be an issue with <code>concat</code>.</p>