Closed KitBurgess closed 4 years ago
@ChloeConnor do you have the URL you used?
it may or may not be a result of this code:
from vortexasdk import CargoMovements
from vortexasdk import Vessels
from vortexasdk import Corporations
cargo_movements = CargoMovements()\
.search(filter_activity='loading_state',
filter_time_min='2019-11-01T00:00:00.000Z',
filter_time_max='2019-11-02T00:00:00.000Z')\
.to_df(columns=['cargo_movement_id', 'product.grade.label', 'product.group.label', 'vessels.0.vessel_class', 'vessels.0.id'])
vessels_in_cms = cargo_movements["vessels.0.id"].tolist()
vessel_details = Vessels().search(ids=vessels_in_cms).to_df(
columns=['id', 'name', 'imo', 'mmsi', 'related_names', 'corporate_entities'])
print(str(len(vessel_details)) + " vessels found")
print(vessel_details)
cms_with_vessel = cargo_movements.merge(
vessel_details, left_on='vessels.0.id', right_on='id')[['id', 'cargo_movement_id']]
how_many_per_vessel = cms_with_vessel.groupby(
by=['id']).count().sort_values(by='cargo_movement_id', ascending=False)
print(how_many_per_vessel)
vessel_owners = vessel_details['corporate_entities']
print(vessel_owners[0])
I haven't been able to reproduce this issue yet.
@all-contributors add @ChloeConnor for userTesting
@KitBurgess
I've put up a pull request to add @ChloeConnor! :tada:
Closing as unreproducible, and this problem hasn't come up again.
https://kite.com/python/docs/urllib.parse.urlencode