Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in load_water #6

Open
pratham16cse opened this issue Jun 11, 2022 · 1 comment
Open

Bug in load_water #6

pratham16cse opened this issue Jun 11, 2022 · 1 comment

Comments

@pratham16cse
Copy link

There is a bug in the load_water(..) function:

root = 'data/SWaT_Dataset_Attack_v0.csv'
data = pd.read_csv(root)
data = data.rename(columns={"Normal/Attack":"label"})
data.label[data.label!="Normal"]=1
data.label[data.label=="Normal"]=0
ts_format = pd.to_datetime(data["Timestamp"], format="%d/%m/%Y %I:%M:%S %p")
ts_no_format = pd.to_datetime(data["Timestamp"])

In the above code block, the dataframes ts_format and ts_no_format should be identical. However, since ts_no_format does not see the format, it treats the string 2/1/2016 7:00:00 AM as Feb 1st 2016 instead of the TRUE date Jan 2nd 2016.

The format specified in the format argument matches the format of the string timestamp. This can be easily verified by checking the format of any string timestamp with date >12.

Not sure how much this bug would affect the performance, but would be nice if the authors could fix it.

@123smile456
Copy link

Hello, I modified this code running or reported an error, can you reply me? Thank you, the following is the code screenshot
image
image

1034 Line time format error. Other lines are correct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants