I have a minor problem with viewing one variable in a table. I changed data type of "date" from object to datetime64, but now it is displayed on 2 lines.


This is the code I used.
df['date']=pd.to_datetime(df["date"])
Is there a way to make it work on one line?
I tried to widen the "date" column, by setting up the maximum width.
pd.set_option('max_colwidth', None)
I think you are asking why the dash breaks the line. In order to force a non-breaking hyphen, replace the normal "-" with this HTML entity:
That is also displayed as a hyphen, but it will not cause a line break.