Pythonで機械学習モデルを作成しています。提供されたデータセットには、複数の数値列と1つのテキスト列が含まれています。テキスト列は製品のカテゴリを表します。製品カテゴリは常に次のいずれかになります。
自転車
車
バンズ
ボート
scikit-learn Python パッケージを使用して回帰モデルを構築しています。
テキスト データを scikit-learn Python パッケージと互換性があるように変換する必要があります。
コードセグメントをどのように完了する必要がありますか? 回答するには、回答領域で適切なオプションを選択してください。
注意: 正しい選択ごとに 1 ポイントが付与されます。

正解:

Explanation:

Box 1: pandas as df
Pandas takes data (like a CSV or TSV file, or a SQL database) and creates a Python object with rows and columns called data frame that looks very similar to table in a statistical software (think Excel or SPSS for example.
Box 2: transpose[ProductCategoryMapping]
Reshape the data from the pandas Series to columns.
Reference:
https://datascienceplus.com/linear-regression-in-python/