Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 1 3

Python output "News Headline" not completely displayed

Hello dear community,

I would like to generate a dataset that captures the news about a stock in a period of time.

However, under the code described in the photo is not displayed in full, but with ... for two columns shortened. I am using PyCharm.

Can someone help me in this case?

Thanks a lot already!

With kind regards

Lukas Rohde

bildschirmfoto-2022-07-07-um-092603.png

eikon-data-apiworkspacepython api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hello @infojw

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?


If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,


AHS

@infojw

Hi,

Please be informed that a reply has been verified as correct in answering the question, and marked as such.

Thanks,

AHS

Upvotes
Accepted
24.6k 54 17 14

Hello @infojw

By default, the Pandas also displays only a limited number of columns.

However, you can use the Pandas option_context() method to set a temporary number of columns:

Example:

import pandas as pd
...
# Request data
with pd.option_context('display.max_columns', None):
    print(newsheadlines)

Result:

full-width-1.png

Note: Since you are printing the Pandas dataframe in a console, so there are some limitations on displaying long data. The dataframe is designed to be displayed on the IPython environment such as Jupyter Noteboook/Julyterlab, not a console.

Hope this helps.


full-width-1.png (112.8 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 0 1 3

Hello wasin.w,

thank you very much for your detailed answer!

Would you say it is better for me to switch to Jupyter Notebook?

I am a beginner in Python and I am trying to allocate financial messages to a sentiment using a bag-of-words approach.

Many greetings

Lukas Rohde

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hello @infojw

JupyterLab/Jupyter notebook is a better environment for learning and exploring Python than a Python console.

You can find the Eikon Data API tutorial with Jupyter on this Python Quants Video Tutorial Series page.

The hardest step is to install Jupyter, you can find more resources on the internet such as:

Hope this helps.


Thank you very much!

best regards

Lukas Rohde

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.