I am querying PostgreSQL using SQLAlchemy and wnat two select only two columns latitude and longitude and store it in numpy for further calculations. SO, I tried a query like this:
result = Places.query.filter_by(latitude, longitude)
But this query isn't working and giving a TYPE ERROR:
TypeError: filter_by() takes exactly 1 argument (2 given)
All i want to do is store the output of two columns and store it in numpy using something like :
np.array(..., dtype=float)
As I am new to both numpy and PostgreSQL, I am stuck in this.
Edit I have selected two columns using:
result = Places.query.with_entities(Places.latitude, Places.longitude).all()
Now, I just need to store them in numpy