マガジンのカバー画像

勉強とPython

38
メモ
運営しているクリエイター

2024年6月の記事一覧

6/7 df

df.sort_values(by = "idx03" , axis = 1 , inplace = True ) ##元のデータフレームの値を並び…

真魚
3か月前

6/6 df

import pandas as pd df = pd.DataFrame({'col01':[1, 5, 9, 13, 17], 'col02':[2, 6, 10, 14,…

真魚
3か月前
1

6/5 df

df.sort_values(by=['金額','時間'],ascending = [True,False,]) 金額は昇順に 時間は降順に…

真魚
3か月前

6/4 df

df = pd.read_excel('Excelパス',sheet_name = 'シート名') ##シートを指定して読み込める df…

真魚
3か月前

6/3 Python

df[df['都道府県名'].str.endswith('山')] str.endswithとは特定の文字列で終わるデータを抽出…

真魚
3か月前
2

6/1 Python

df[df['都道府県名'].str.contains('川')] str.containsとは特定の文字列を含む要素を持つ行の…

真魚
3か月前
1