python
# テストデータs = """列1,trade_date,product_class,instrument_id,instrument,broker_code,broker_name,item,volume 12,20220610,A,60018,A 2206,11560,G,SELL,181.0 38,20220609,A,90018,A 2209,11560,G,SELL,1.0 56,20220608,AA,60019,AA 2206,11560,G,SELL,395.0 84,20220603,B,60005,B 2206,11560,G,SELL,1895.0 103,20220602,B,90005,B 2209,11560,G,SELL,1179.0 8282,20220531,A,60018,A 2206,11560,G,BUY,153.0 56,20220606,AA,60019,AA 2206,11560,G,BUY,395.0 8282,20220531,A,60018,A 2206,11560,G,SELL,153.0 8305,20220530,AA,10019,AA 2206,11560,G,SELL,8129.0 8345,20220523,B,10005,BB 2206,11560,G,SELL,5708.0 8638,20220522,A,60018,A 2206,11560,G,SELL,556.0 8662,20220521,B,60005,B 2206,11560,G,SELL,5862.0 9995,20220519,A,60018,A 2206,11560,G,SELL,50.00 9996,20220518,AA,90018,AA 2209,11560,G,BUY,150.00"""df = pd.read_csv(StringIO(s), dtype={'trade_date':str})
0 コメント