title: Referencing a dataframe object's index and column?
body: <p>I have the following dataframe. I want to create a new dataframe based on the column and index of elements, but I am unable to reference to their index name.</p>
  
  <pre><code>   AAA  BBB  CCC  DDD
  A  NaN  NaN  NaN  NaN
  B  NaN  NaN  NaN  NaN
  C  NaN  NaN  NaN  NaN
  D  NaN  NaN  NaN  NaN
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>df_ind = {'A' : '2014' ,'B': '2011' , 'C': '2007' , 'D' : '2009'}
  df_col = {'AAA': '2011' ,'BBB': '2015' , 'CCC': '2007' , 'DDD' : '2012'}
  df_tmp = pd.DataFrame(index = df_ind.keys() , columns =df_col.keys()  )
  print df_tmp    
  df4 = pd.DataFrame(np.where( int(df_col[df_tmp.column]-df_ind[tmp_df.index]) &gt;1 , True, False) ,  index = df_ind.keys() , columns =df_col.keys()   )
  print df4
  </code></pre>
  
  <p>Basically, I want to make elements with difference between dates of their columns and indices less than 2 year as True except false.</p>
  
  <p>Edit1 : modified problem to clarify it .</p>