I am using matplotlib to plot these two line graphs. However, only sometimes my graphs would have an intersection. How can I detect if my line graphs have an intersection?
df = pd.read_csv("test.csv")
df2 = pd.read_csv("test2.csv")
x1 = df['A'].tolist()
x1 = np.array(x1)
y1 = df['D'].tolist()
y1 = np.array(y1)
x2 = df2['X'].tolist()
x2 = np.array(x2)
y2 = df2['Y'].tolist()
y2 = np.array(y2)
plt.plot(x1,y1)
plt.plot(x2,y2)
plt.show()


