發表文章

目前顯示的是 1月 31, 2019的文章

Why does accessing columns of a pandas dataframe with .loc[] produce duplicate rows?

圖片
1 Why is .loc producing duplicate rows in my DataFrame? I'm trying to select a few columns from m3, a DataFrame with 47 columns,to create a new DataFrame called output. The problem: after accessing m3's columns with .loc , output has way more duplicates than m3 started with. Where could these duplicates have come from? I haven't found anything online about .loc duplicating rows. The output DataFrame is declared on the line that reads output = m3.loc[...] , by the way. The Code: print("ARE THERE DUPLICATES in m3? ") print(m3.duplicated().loc[lambda x: x==True]) output = m3.loc[:,["PLC_name", "line", "track", "notes", "final_source", "s_name", "s_line", "s_track", "loc", "alt_loc", &qu

Subaru 360

圖片
Subaru 360 Overview Manufacturer Subaru Also called Subaru 450 [1] K-10 (prototype) [2] Production 1958–1971 Assembly Otakita Plant, Ōta, Gunma, Japan Designer Shinroku Momose Body and chassis Class Microcar Body style 2-door sedan 2-door convertible 3-door station wagon Layout RR layout Doors Suicide doors Related Subaru Sambar Powertrain Engine 356 cc EK31 straight-twin 356cc EK32 straight-twin 423cc EK51 straight-twin Dimensions Wheelbase 1,801 mm (70.9 in) Length 2,990 mm (117.7 in) Width 1,300 mm (51.2 in) Height 1,379 mm (54.3 in) Curb weight 410 kg (900 lb) Chronology Successor Subaru R-2 The Subaru 360 is a rear-engined, two-door city car manufactured and marketed from 1958 to 1971 by Subaru. As the company's first automobile, production reached 392,000 over its 12-year model run. Noted for its small overall size, 1,000 lb curb weight, monocoque construction, swing axle rear suspen