title: How to perform Dickey Fuller Test for First Order Integration?
body: <p>I am trying to perform an augmented Dickey Fuller test on the first integration of a variable, but I keep getting a Missing data error no matter what I do</p>
  
  <p>Code:</p>
  
  <pre><code>texas = pd.read_stata('texas.dta')
  texas['dtex'] = texas['txnag'] - texas['txnag'].shift(1)
  texas['dtex'].replace([np.inf, -np.inf], np.nan).fillna(0)
  
  dtec = adfuller(texas['dtex'].values)
  </code></pre>
  
  <p>And I get this output:</p>
  
  <pre><code>MissingDataError: exog contains inf or nans
  </code></pre>
  
  <p>What am I doing wrong? I guess it must be obvious, but I have no idea whatsoever. </p>