0

Im starting with python, Jupyterlab and pandas. So as you can see in the image, I created some new columns different from the imported from my csv files, but they are displayed like this, I want that all my columns are align with each other, to keep everything in order.

Thanks for any help

I dont really know a workaround for this problem. I also dont know know how I could find a direct answer in Google.

  • 1
    I see that the columns are added successfully, I guess maybe just the display area does not have enough space to display all columns in one line? – buzzbuzz Apr 01 '22 at 04:29
  • 1
    See this:[ow do I expand the output display to see more columns of a Pandas DataFrame?](https://stackoverflow.com/questions/11707586/how-do-i-expand-the-output-display-to-see-more-columns-of-a-pandas-dataframe) `pd.set_option('display.max_columns', 500)` – r-beginners Apr 01 '22 at 04:39

2 Answers2

3

Try this and see if it works for you:

print(df.to_string())
le_camerone
  • 630
  • 5
  • 17
1

you can also use visual studio code which is more convenient or `

pd.set_option('display.max_columns', None)
Nullndr
  • 1,624
  • 1
  • 6
  • 24
Kyriakos
  • 181
  • 1
  • 8