I have a pandas data frame like below (one line sample):
df.sample()
IDData HP Feedrate RPM Coolant1 Coolant2 Coolant3 Coolant4 ApproachOn Extreme Wear UCut SlopeHP AccumulatedWork CuttingHP File Time Stamp Tool
60 60 1048 0 0 408 0 0 0 False 0 0 0 0 0 -22 7 1 2019 6 45 22 AM T12
You can see the File Time Stamp
column is strange. I try to run the code below:
df['File Time Stamp'] = pd.to_datetime(df['File Time Stamp'], format='%m %d %Y %I %M %S %p')
The format is correct I believe, but I get an error in VSCode (no traceback from Python) Unable to open 'strptime.pyx': Unable to read file (Error: File not found)
. What I don't understand is it's looking in the directory of the script I'm running, instead of the pandas folder.
For instance it's looking in (c:\users\directory_of_my_script\pandas\_libs\tslibs\strptime.pyx))
but this pandas folder does not exist obviously.
As a test I ran the same code in Jupyter Notebook and it runs fine, so it seems a VSCode issue.
Why am I getting this error? Why is it looking in the wrong directory?
Using VSCode version 1.37.1
Anaconda version 2019.03
Python version 3.7.3