This is a pandas question, which is a third-party package, not part of Python’s standard library. I suggest consulting a pandas-specific resource.
However, something like this should work where
df is your DataFrame:
df.loc[df["Date"] == YOUR_DATE, "Close"]
The value of
YOUR_DATE depends on whether date is stored as an actual
datetime64 (pd.timestamp) or is a string, and if you want the scaler, you may need to get it with
, but that’s an exercise for the reader. I encourage you to read the docs for more details. Best of luck.