發表文章

目前顯示的是 3月, 2026的文章

吳晨瑄ETCEL百分比PERCENTRANK排序RANK

圖片

吳晨瑄Pandas.describe.EXCEL.percententrank

圖片
import pandas rows = pandas.read_csv('TWSE.csv',encoding = 'utf-8') print(rows.head(4)) print(rows['會計師事務所'].describe()) print(rows['員工人數-母公司'].describe())

吳晨瑄python+csv+pandas

圖片
import pandas rows = pandas.read_csv('TWSE.csv',encoding = 'utf-8') print(rows.head(4)) print(rows['會計師事務所'].describe())

吳晨瑄Python套件CSV比較EXCEL

圖片
import csv #輸入csv套件comma separated value file = open('TWSE.CSV','r',encoding='utf-8') #打開下載的檔案TWSE.CSV,模式是r讀取, csvreader = csv.reader(file) #將檔案逐列讀入串列變數csvreader header, rows = [], [] #宣告空白串列(陣列,清單) header = next(csvreader) #串列header存放第一列標題 for row in csvreader: #逐列讀檔案、附加append於rows串列 rows.append(row) file.close() #關閉檔案 print(header) for i in range(6): print('輸出第', i,'公司: ',rows[i-1]) print('吳晨瑄統計' , len(rows)) print('排在最後', rows[-1])