Is there any method for vectorize computaion on python for stored data in database ? or we should just use for loop ?
Welcome to the community. Can you please elaborate a bit more?
What kind of stored data are you referring to and what kind of operations do you want to perform on them?
If it’s tabular data in a SQL server, you could just extract the relevant data, convert it to a dataframe and then perform the operations in a vectorized fashion.
Just to add a little bit to what @SomeshChatterjee has answered, in case the data is too large to fit inside a pandas dataframe or numpy array at once, you can use libraries like Dask. It is a library used for parallel computing in Python, and using this you can use the vectorized computation even for datasets large enough to not fit inside your RAM. I hope this helps.
thanks for your answer, Dask is a great solution .