マガジンのカバー画像

Python悪戦苦闘

40
プログラミング言語「Python」をノンプログラマーがやったらこうなる。悪戦苦闘の連続でも、全くめげない奮闘記。
運営しているクリエイター

#特徴量

【Python】print等のデータ表示を省略しない。行列の両方向を省略しない【全て表示】

【Python】print等のデータ表示を省略しない。行列の両方向を省略しない【全て表示】

Python学習中に私がそうだったのですが、printでデータ内容の全体を見たいのに「…」になって、省略表示されてしまう。

検索しても、行方向や列方向の表示数のどちらかだけを増やすサンプルが多くて、コピペに困ってたんです。

そこでコピペ用のPython「…」データ省略の防止策。

import pandas as pd#現在の最大表示数print(pd.get_option("display.

もっとみる
【Python】Featuretools ft.list_primitives() パラメータ一覧 #特徴量

【Python】Featuretools ft.list_primitives() パラメータ一覧 #特徴量

ft.list_primitives()

ft.primitives.list_primitives()

name type description0 last aggregation Determines the last value in a list.1 mean aggregation Computes the average for a list of values.2 std a

もっとみる
【Python】DataFrame内のある列に、\t\nとか改行やらがあって、それを消去する方法

【Python】DataFrame内のある列に、\t\nとか改行やらがあって、それを消去する方法

解消した方法df_xx['予'] = df_xx['予'].str.strip()

次点df_xx['予'] = df_xx['予'].replace("\t","", regex=True)​df_xx['予'] = df_xx['予'].replace("\n","", regex=True)

実際のデータ\n \tを消したい。

もっとみる