title: How can I display max column width and write into a file with max width in Python?
body: <p>I am trying to display a column in full (containing tweet texts) in Python, but even if I use pd.set_option('display.max_colwidth', None), the output returns as truncated. The code below lets me display the maximum width, but what I want is to save the file as output with max column width. Any help is appreciated.</p>
  <pre><code>def display_text_max_col_width(df, width):
      with pd.option_context('display.max_colwidth', width):
          print(df)
  
  display_text_max_col_width(df[&quot;col&quot;], 1000)
  
  [tweets ending with ellipsis][1]
  </code></pre>