import pandas as pd
import matplotlib.pyplot as plt

# Load the data file
df = pd.read_table(r"D:\Download\data\NIFTY0919.txt", sep=";")

# Add the Date Time column
df = df.assign(Date Time=df["Date Time"].str.split(" ", expand=True)[0], )


# Convert the data into a Pandas DataFrame
df = df.set_index("Date Time")

# Create a new figure and axes
fig, ax = plt.subplots()

# Plot the data on the axes
ax.plot(df["Open"], label="Open")
ax.plot(df["High"], label="High")
ax.plot(df["Low"], label="Low")
ax.plot(df["Close"], label="Close")

# Set the title, x-axis label, and y-axis label
ax.set_title("Stock Price Chart")
ax.set_xlabel("Date")
ax.set_ylabel("Price")

# Save the figure
plt.savefig("chart.png")
fix error Write your response with at least 1000 words.
user