From 36235a53226e5637eab490d169b64e8d26253045 Mon Sep 17 00:00:00 2001 From: RJ Worth Date: Tue, 10 Sep 2019 19:57:14 -0500 Subject: [PATCH] replacing deprecated .ix with .loc --- .../crimetype/models/binary_stemmed_logistic/save_model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tagnews/crimetype/models/binary_stemmed_logistic/save_model.py b/lib/tagnews/crimetype/models/binary_stemmed_logistic/save_model.py index e7ccabc..4027554 100644 --- a/lib/tagnews/crimetype/models/binary_stemmed_logistic/save_model.py +++ b/lib/tagnews/crimetype/models/binary_stemmed_logistic/save_model.py @@ -23,9 +23,9 @@ else: raise Exception('BAD ARGUMENTS') -crime_df = df.ix[df.loc[:, 'OEMC':'TASR'].any(1), :] +crime_df = df.loc[df.loc[:, 'OEMC':'TASR'].any(1), :] crime_df = crime_df.append( - df.ix[~df['relevant'], :].sample(n=min(3000, (~df['relevant']).sum()), + df.loc[~df['relevant'], :].sample(n=min(3000, (~df['relevant']).sum()), axis=0) )