Skip to content

Commit 51fdff1

Browse files
author
sreeder
committed
remove comments. fix issue #305
1 parent 28d94f1 commit 51fdff1

1 file changed

Lines changed: 1 addition & 18 deletions

File tree

odmtools/odmservices/edit_service.py

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -694,31 +694,14 @@ def add_annotations(self, annolist):
694694
# remove any duplicates
695695
annolist.drop_duplicates(["resultid", "annotationid", "valuedatetime"], keep= 'last', inplace = True)
696696
newdf = pd.merge(annolist, vals, how='left', on= ["resultid", "valuedatetime"], indicator = True)
697-
print "after merge"
698-
print newdf
699-
# newdf = newdf(newdf['_merge'], axis = 1, inplace = True)
700-
# print "after filter"
701-
# print newdf
697+
702698

703699
#get only AnnotationID and ValueID
704-
print "after column selection"
705700
mynewdf= newdf[["valueid_y","annotationid"]]
706-
print "rename columns"
707701
mynewdf.columns = ["ValueID", "AnnotationID"]
708-
print newdf
709-
710702

711703
# save df to db
712-
print "save to db"
713704
self.memDB.series_service.add_annotations(mynewdf)
714-
print "done"
715-
716-
717-
# df.drop_duplicates(dup_cols, keep='last', inplace=True)
718-
# newdf = pd.merge(df, pd.read_sql(query, engine), how='left', on=dup_cols, indicator=True)
719-
# newdf = newdf[newdf['_merge'] == 'left_only']
720-
# newdf.drop(['_merge'], axis=1, inplace=True)
721-
# return df[df['valuedatetime'].isin(newdf['valuedatetime'])]
722705

723706

724707

0 commit comments

Comments
 (0)