Closed NoamXD8 closed 4 months ago
@NoamXD8 paris_data = pycoa.get(which='tot_dchosp', where='Paris', output='pandas',option='sumall') nord_data = pycoa.get(which='tot_dchosp', where='Nord', output='pandas',option='sumall') you should add option='sumall' for both (speticaly for the Nord to add all the dep.)
But I need to check why pycoa.get(which='tot_dchosp', where='Paris', output='pandas',option='sumall') != pycoa.get(which='tot_dchosp', where='Paris', output='pandas' )
fixed
pycoa.setwhom('spf', reload=False)
result = pycoa.get(which='tot_dchosp', where=['Paris', 'Nord'], option='sumall') result = result['tot_dchosp'] print(result) paris_data = pycoa.get(which='tot_dchosp', where='Paris', output='pandas') nord_data = pycoa.get(which='tot_dchosp', where='Nord', output='pandas')
we want expected result
expected_result = paris_data['tot_dchosp'] + nord_data['tot_dchosp'] print(expected_result) expected_result.equals(result)
Memory usage of all columns: 478,800 bytes 0 49.142857 1 49.142857 2 49.142857 3 49.142857 4 49.142857 ...
1195 12704.428571 1196 12705.285714 1197 12706.285714 1198 12707.428571 1199 12708.285714 Name: tot_dchosp, Length: 1200, dtype: float64 Memory usage of all columns: 451,200 bytes Memory usage of all columns: 447,600 bytes 0 17.0 1 27.0 2 35.0 3 41.0 4 51.0 ...
1195 12707.0 1196 12708.0 1197 12709.0 1198 12711.0 1199 12711.0 Name: tot_dchosp, Length: 1200, dtype: float64 False