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
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With