Reputation: 13
[1]In google colab, While viewing the variable, it always truncates after a certain limit in the output screen
Colab, I tried to print the string as whole even characters but at the end it prints as (...)
import pandas as pd
d = {'Title': ["Hello, hope you are doing good, every one is fine in your place"]}
m = pd.DataFrame(d)
m['Title']
output:
0 Hello, hope you are doing good, every one is f...
I need to view the full output as the whole string.
[Output is truncated] [1]: https://i.sstatic.net/ZZ7pJ.jpg
Upvotes: 1
Views: 15707
Reputation: 38579
You're observing a 'feature' of Pandas wherein it truncates long strings when formatting DataFrame objects.
To configure the truncation limit, use:
pd.set_option('display.max_colwidth',1000)
(Of course, you can adjust the value 1000
to whatever you prefer.)
Afterward, your example will produce the expected output like so:
Upvotes: 7