<SYSTEM_TASK:>
Given the following text problem statement, write Python code to implement the functionality described below in problem statement
<END_TASK>
<USER_TASK:>
Problem:
I am new to scikit-learn, but it did what I was hoping for. Now, maddeningly, the only remaining issue is that I don't find how I could print the model's coefficients it estimated. Especially when it comes to a pipeline fitted by a GridSearch. Now I have a pipeline including data scaling, centering, and a classifier model. What is the way to get its estimated coefficients?
<ASSISTANT_TASK:>
Python Code:
import numpy as np
import pandas as pd
from sklearn.linear_model import RidgeClassifier
from sklearn.model_selection import GridSearchCV
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import StandardScaler
X, y = load_data()
assert type(X) == np.ndarray
assert type(y) == np.ndarray
pipe = Pipeline([
    ("scale", StandardScaler()),
    ("model", RidgeClassifier(random_state=24))
])
grid = GridSearchCV(pipe, param_grid={"model__alpha": [2e-4, 3e-3, 4e-2, 5e-1]}, cv=7)
grid.fit(X, y)
coef = grid.best_estimator_.named_steps['model'].coef_
<END_TASK>