title: 'module' object has no attribute 'isna'
body: <p>I have a df called <code>batch_df</code> and I added 'as_percentage' into the df. If hours is Nan, then set as_percentage as 0. The code ran fine in PyCharm but when I ran it on the terminal, I got this error: Please help!</p>
  
  <blockquote>
    <p>Traceback (most recent call last):</p>
    
    <p>File "/Users/vic_ong/dev/resource-management/generateBatch.py", line 166, in 
        main()</p>
    
    <p>File "/Users/vic_ong/dev/resource-management/generateBatch.py", line 51, in main</p>
    
    <p>batch_df.loc[pd.isna(batch_df['hours']) == False, 'as_percentage'] = 0
    AttributeError: 'module' object has no attribute 'isna'</p>
  </blockquote>
  
  <p>Edit -- My code looks like this:</p>
  
  <pre><code>#!/usr/bin/env python2
  import lib
  import pandas as pd
  import datetime
  import os
  pd.set_option('expand_frame_repr', False)
  # get directories
  batchInputDir = '/Users/vic_ong/dev/resource-management/data/input/batchUpload'
  
  
  def main():
  # start timer
  start_time = datetime.datetime.now()
  
  # walk into every csv file in batchUpload and concatenate them into one df
  list_ = []
  for root, dirs, files in os.walk(batchInputDir):
      for file in files:
          if file.endswith('.csv'):
              df = pd.read_csv(os.path.join(batchInputDir, file), index_col=None, header=0)
              list_.append(df)
  batch_df = pd.concat(list_)
  batch_df = batch_df.dropna(how='all')
  batch_df.reset_index(drop=True, inplace=True)
  # clean data frame
  # rename to standardized column names
  batch_df.rename(columns={'Resource Name': 'name',
                           'Hours': 'hours'},
                  inplace=True)
  # determine if value given was a percentage
  batch_df['as_percentage'] = 1
  batch_df.loc[pd.isna(batch_df['hours']) == False, 'as_percentage'] = 0
  print batch_df.head
  
  if __name__ == '__main__':
  main()
  </code></pre>
  
  <p>batch_df sample:</p>
  
  <p><code>name  hours  as_percentage
  vic   Nan      1
  vic1  Nan      1</code></p>