Closed thenineteen closed 3 years ago
problem was that the ratio by which to reduce/weigh the spread of locaisaiotn wasn't being broadcasted as expected when dealing with series and dataframes (as opposed to the tests, which were a single row)
pandas's df.multiply() was a little more tricky than expected, needing the df first (rather than the series of ratios) and the default axis was 'columns'. Changing this to 0 fixes the issue.
as per comment in #191 related to #190 - the tests and function were developed for a single row, hence this line worked:
float(new_inspect_result.loc[gif_indices, 'ratio'])
but during actual database query, .astype() is required rather than float()