Swapping what columns is x or y is easy.
import pandas as pd
import random
import matplotlib.pyplot as plt
times = pd.date_range(start='2022-03-1', end='2022-03-21', periods=21)
levels = [random.randint(1, 10) for _ in times]
df = pd.DataFrame({"date": times, "level": levels})
print(df)
df.plot(kind="line", x="date", y="level")
df.plot(kind="scatter", x="level", y="date")
plt.show()
I don't understand what you mean by this:
What I want to do is to plot the data, but on x-axis instead of depicting timestamps I want to print strings, such as: "name_1" , "name_2", "name_3".
What are these names? You said you hand two columns, only two things to plot; date and level. Where do these names come in?
But if you have a bunch of names, you can add them as a column to your dataframe and select the name column as one of the things that is plotted.