1

I've found that when analyzing large amounts of data, Pycharm likes to put ellipses between columns. Below is my code. Tesla1.csv contains stock prices of Tesla for the last two years.

df = pd.read_csv('Tesla1.csv', parse_dates = True, index_col = 0)
df['100_moving_average'] = df['Adj Close'].rolling(window = 100, min_periods = 0).mean()
print(df.head())

Here's my output.

                  High         ...          100_moving_average
Date                           ...                            
2017-01-03  220.330002         ...                  216.990005
2017-01-04  228.000000         ...                  221.990005
2017-01-05  227.479996         ...                  223.576670
2017-01-06  230.309998         ...                  224.935001
2017-01-09  231.919998         ...                  226.204001

[5 rows x 7 columns]

I do not get to see the in-between columns. Is there a way to fix this? Is this a problem exclusive to Pycharm?

Nihal
  • 5,262
  • 7
  • 23
  • 41
koifish
  • 424
  • 1
  • 6
  • 16
  • this is because of pandas. no fault of pycharm. you have to change pandas option after importing it. – Nihal Dec 06 '18 at 10:31
  • Possible duplicate of [Output data from all columns in a dataframe in pandas](https://stackoverflow.com/questions/11361985/output-data-from-all-columns-in-a-dataframe-in-pandas) – Nihal Dec 06 '18 at 10:34
  • 1
    set `pandas.set_option('display.max_columns', None)` and `pandas.set_option('display.width', 300)` – Nihal Dec 06 '18 at 10:35

1 Answers1

2

You can use pd.set_option('display.width', width) or this link looks like it may help you with your problem.