Feb-08-2023, 02:20 AM
Hello:
Just started in python and have successfully connected to an application using its API
When I query the API for Data I get a list returned with each list item being one line of 22 comma-separated properties from the database
I have loaded the list into a numpy array but it is only one dimensional.. as in List[0]-> 22 comma separated values, List[1]-> 22 comma separated values
What is the easiest way to convert this into a 2D array [#listitems, 23] and load each property in its appropriate element in the array.
Ex:
List [0] = assigne_id=None, assigner_id=987, comment_count=0, and so on
List [1] = assigne_id=None, assigner_id=123, comment_count=0, and so on
My array would be
List [1,2] would return assigner_id=123
Bonus points on how I would just load the data in the array after the equals
Just started in python and have successfully connected to an application using its API
When I query the API for Data I get a list returned with each list item being one line of 22 comma-separated properties from the database
I have loaded the list into a numpy array but it is only one dimensional.. as in List[0]-> 22 comma separated values, List[1]-> 22 comma separated values
What is the easiest way to convert this into a 2D array [#listitems, 23] and load each property in its appropriate element in the array.
Ex:
List [0] = assigne_id=None, assigner_id=987, comment_count=0, and so on
List [1] = assigne_id=None, assigner_id=123, comment_count=0, and so on
My array would be
List [1,2] would return assigner_id=123
Bonus points on how I would just load the data in the array after the equals