You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
fraud_detection/test.py

11 lines
341 B

import pandas
data = pandas.read_csv("creditcard.csv")
guessed_class = []
for r in data.iterrows():
good = True
if abs(r[1]["V17"] - -6.665836399449663) < abs(r[1]["V17"] - 0.01153506325212925):
good = False
guessed_class.append(0 if good else 1)
data["guess"] = guessed_class
print(data.head(10))
data.to_csv("woo2.csv")