Python: Method .as_matrix will be removed in a future version. Use .values instead

'numpy.ndarray' object is not callable
'dataframe' object has no attribute 'as_matrix'
python dataframe to 2d array
dataframe to 1d array
convert pandas dataframe to 3d numpy array
pandas groupby to numpy array
pandas create matrix from dataframe
pandas pivot table to numpy array