title: Can't access DataFrame elements after reading from CSV
body: <p>I'm creating a matrix and converting it into DataFrame after creation. Since I'm working with lots of data and it takes a while for creation I wanted to store the matrix into a CSV so I can just read it once is created. Here what I'm doing:</p>
  <pre><code>transitions = create_matrix(alpha, N)
  # convert the matrix to a DataFrame 
  df = pd.DataFrame(transitions, columns=list(tags), index=list(tags))
  
  df.to_csv(r'D:\U\k\Desktop\prg\F_transition_' + language + '.csv')
  df_r = pd.read_csv('transition_en.csv')
  </code></pre>
  <p>The fact is that after reading from CSV I got the error:</p>
  <p><strong>in get_loc raise KeyError(key). KeyError: 'O'</strong></p>
  <p>It seems this is thrown by those lines of code:</p>
  <pre><code>        if i == 0:
              tran_pr = df_r.loc['O', tag]
          else:
              tran_pr = df_r.loc[st[-1], tag]
  </code></pre>
  <p>I imagine that once the data is stored in a CSV, the reading of the file is not equivalent to the DataFrame I had before. How can I convert these lines of code to login like I did before?
  I tried to set index=False when creating the csv and also skip_blank_lines=True when reading. Nothing changes</p>
  <p>df_r is like:</p>
  <p><a href="https://i.stack.imgur.com/NY1qx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NY1qx.png" alt="df_r" /></a></p>