Brian Brian - 2 years ago 175
Python Question

matrix math using pandas

I have a

that I'd like to perform matrix multiplication with. Can pandas do that?

import pandas as pd
import numpy as np

df = pd.DataFrame(np.random.rand(5, 5))

I don't want to have to do this:

Answer Source

pandas DataFrame's also have a dot method.

Just do this:
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download