0

I run this python code on VS code to get historical data of some stocks i choose.

The python code

from pandas_datareader import data
from pandas_datareader._utils import RemoteDataError
import matplotlib.pyplot as plt
import pandas as pd 
import numpy as np 
from datetime import datetime

STAR_DATE = '2005-01-01'
END_DATE = str(datetime.now().strftime('%Y-%m-%d'))

UK_STOCK = 'UU.L'
USA_STOCK = 'AMZN'

def get_data(ticker):
    try:
        stock_data = data.DataReader(ticker,
                                    'yahoo',
                                     STAR_DATE,
                                    END_DATE)
        print(stock_data)    
                            
    except RemoteDataError:
        print('No Data found for {t}'.format(t=ticker))

get_data(USA_STOCK)  

Code

I run the code and everything is going fine. But it doesn t show in the termninal all the rows of data i want. It shows me only a part of that rows. It says 4071 rows, yet it doesn t show all of that rows.

enter image description here

How do i display in the terminal all the rows?

wolfbooy
  • 43
  • 7
  • 1
    This link might help you with your question: https://stackoverflow.com/questions/11707586/how-do-i-expand-the-output-display-to-see-more-columns-of-a-pandas-dataframe – wowonline Mar 07 '21 at 22:57
  • Thank you so much!! I found it! – wolfbooy Mar 08 '21 at 12:49
  • I found the answer in that link. https://stackoverflow.com/questions/11707586/how-do-i-expand-the-output-display-to-see-more-columns-of-a-pandas-dataframe – wolfbooy Mar 08 '21 at 12:52

0 Answers0