0

Uponing working on Ipython

In [27]: movies.head(n=2)
Out[27]:
   star_rating                     title content_rating  genre  duration                                        actors_list
0          9.3  The Shawshank Redemption              R  Crime       142  [u'Tim Robbins', u'Morgan Freeman', u'Bob Gunt...
1          9.2             The Godfather                                 R  Crime       175    [u'Marlon Brando', u'Al Pacino', u'James Caan']

However, in org source code:

#+BEGIN_SRC ipython :session my :export both :results output
import pandas as pd
# read a dataset of top-rated IMDb movies into a DataFrame
movies = pd.read_csv('../data/imdbratings.csv')
print(movies.head(n=2))
print(movies.tail(n=2))
#+END_SRC

#+RESULTS:
#+begin_example
   star_rating                     title content_rating  genre  duration  \
0          9.3  The Shawshank Redemption              R  Crime       142   
1          9.2             The Godfather                                 R  Crime       175   

                                         actors_list  
0  [u'Tim Robbins', u'Morgan Freeman', u'Bob Gunt...  
1    [u'Marlon Brando', u'Al Pacino', u'James Caan']  
     star_rating        title content_rating   genre  

It becomes two lines.

How could display the results in one line?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.