2

I saved an excel file into a CSV and uploaded it using Google Colab's file.upload().

from google.colab import files
uploaded = files.upload()

If I view "uploaded" it shows the full file. When I save it into a data frame using:

data = pd.read_csv(io.StringIO(uploaded["OilEx No Tickers.csv"].decode("utf-8")))

data returns

websites cut off

which is useless as the websites are cut off. They do not work in the function I am trying to run them through later as they aren't the full site. Any suggestions? Thank you.

enamoria
  • 896
  • 2
  • 11
  • 29
djdono
  • 23
  • 3

1 Answers1

0

The first time I faced this problem myself, I bookmarked PX0r's answer to this Stack Overflow question, which is to run this command, then re-display the DataFrame:

pd.set_option('max_colwidth', 800)

To reset this option to its default value without having to restart the kernel:

pd.reset_option('max_colwidth')

Some other useful commonly used options in the official docs: https://pandas.pydata.org/pandas-docs/stable/options.html#frequently-used-options

Peter Leimbigler
  • 10,775
  • 1
  • 23
  • 37
  • 1
    Thank you. I did not realize that this was a setting with pandas itself, as I beveled it was with the the read_csv function. You have helped solve my issue. On to the next error! – djdono Nov 26 '18 at 01:50
  • 1
    @djdono, if this answer has solved your problem, then you should accept it. Check out: https://stackoverflow.com/tour – smj Nov 26 '18 at 03:25