0

The below shown is the output console in pycharm. I would like to show a long sentence print out but it gives me ...

                                             notes
0  {'Notes': "85 Male Malay  NKDA walking stick a...
1  {'Notes': '85yo chinese man nkda PHX 1) Hypert...

This is the codes I used to achieved the print out:

pd.set_option('display.width', 100000)
pd.set_option('display.max_rows', 5000, 'display.max_columns', 500)
df = pd.DataFrame(np.array(c3), columns=["notes"]).drop_duplicates()
print(df)
  • 2
    Possible duplicate of [How to stop IntelliJ truncating output when I run a build?](https://stackoverflow.com/questions/7836313/how-to-stop-intellij-truncating-output-when-i-run-a-build) – ricky3350 Sep 19 '18 at 02:17

1 Answers1

0

IIUC using pd.options

pd.options.display.max_colwidth = 1000
pd.Series('this is very long long long long long long long long long string')
Out[39]: 
0    this is very long long long long long long long long long string
dtype: object

Update

pd.Series([{'LOL!':'this is very long long long long long long long long long stridddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddng','LOL2':'this is very long long long long long long long long long string'}])
Out[47]: 
0    {'LOL2': 'this is very long long long long long long long long long string', 'LOL!': 'this is very long long long long long long long long long stridddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddng'}
dtype: object
BENY
  • 317,841
  • 20
  • 164
  • 234
  • It does work, but why is the data not aligned... @Wen –  Sep 19 '18 at 01:32
  • @Lynn I think that may because of the dict – BENY Sep 19 '18 at 01:34
  • @Lynn seems like working on my side , would you like make your dataframe head, using df.head().to_dict() and post the result here ? – BENY Sep 19 '18 at 01:40
  • Still the same output :O @Wen –  Sep 19 '18 at 01:43
  • I got only one column. However I added the c3 which is an array into numpy array. Purpose of doing so is to conduct text analysis later @Wen –  Sep 19 '18 at 02:02