0

I have a problem that I could not figure out. I have a DataFrame (df) that looks like the attached pictureenter image description here

The contents of this DataFrame are converted to datetime and used for plotting in Power BI based on what I learned here with the following code which you can find in the link

df = df.apply(lambda col: pd.to_datetime(col, format='%Y-%m-%dT%H:%M:%S.%f'), axis=0)

my problem is that when I am working with a computer that has United state settings then the below line works perfectly

df.plot(x='Scale',ax=ax, rot=0,linewidth=.5, marker='o')

but when I write the same code on a German computer then suddenly this stops working and I get a strange plot so I would be grateful if you tell me what's wrong and how can I make it work?

I suspect the naT is causing problems.

  • 1
    Could you share a plot and also some sample rows of your current output with from the German computer please? – Celius Stingher Jun 03 '23 at 10:12
  • Decimal separators are different in different countries. Additionally, you may be running into a date issue. German dates are formatted DD-MM-YY. https://german.stackexchange.com/questions/49204/in-germany-commas-are-used-as-decimal-separators-in-numbers-so-what-character – Luke_0 Jun 03 '23 at 21:11

0 Answers0