Issue
I want to read one csv file into Jupyter Notebook with Python's Pandas lib. I have uploaded .csv file into jupyter notebook, and I wrote a code, but I think that my dataframe does not display correctly. This is the code for reading the file:
df = pd.read_csv('text analysis.csv')
print(df)
And my output, when I print that dataframe looks like this:
avg title word len. avg text word len. avg sent. len. \
0 5.20 4.27 11.00
1 4.69 4.98 26.20
2 5.50 4.53 21.62
3 4.82 4.42 15.10
4 6.40 5.07 36.50
... ... ... ...
34205 4.29 4.96 24.60
34206 4.67 4.58 13.00
34207 4.92 5.08 26.79
34208 4.09 4.72 22.23
34209 4.75 5.76 18.38
I have seen much better representation on JN, with all cells. This looks worse then when I print dataframe in idle
Solution
Try to use display() insted of print() and check it.
Answered By - Ali Barani
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.