文章目录
7 数据预处理7.1 重复值处理7.2 缺失值处理7 数据预处理
7.1 重复值处理
数据清洗一般从重复值和缺失值开始重复值一般采用删除发来处理但有些重复值不能删除,例如订单明细数据或交易明细数据等import numpy as npimport pandas as pdimport os os.chdir(r'D:\code\jupyter\course\代码和数据')df = pd.read_csv('MotorcycleData.csv', encoding = 'gbk', na_values = 'Na')#把空字符串(Na)读成空值(NaN)df.head()Condition Condition_Desc Price Location Model_Year Mileage Exterior_Color Make Warranty Model ... Vehicle_Title OBO Feedback_Perc Watch_Count N_Reviews Seller_Status Vehicle_Tile Auction Buy_Now Bid_Count0 Used mint!!! very low miles $11,412 McHenry, Illinois, United States .0 16,000 Black Harley-Davidson Unspecified Touring ... NaN FALSE 8.1 NaN 2427 Private Seller Clear True FALSE 28.01 Used Perfect condition $17,200 Fort Recovery, Ohio, United States .0 60 Black Harley-Davidson Vehicle has an existing warranty Touring ... NaN FALSE 100 17 657 Private Seller Clear True TRUE 0.02 Used NaN $3,872 Chicago, Illinois, United States 1970.0 25,763 Silver/Blue BMW Vehicle does NOT have an existing warranty R-Series ... NaN FALSE 100 NaN 136 NaN Clear True FALSE 26.03 Used CLEAN TITLE READY TO RIDE HOME $6,575 Green Bay, Wisconsin, United States .0 33,142 Red Harley-Davidson NaN Touring ... NaN FALSE 100 NaN 2920 Dealer Clear True FALSE 11.04 Used NaN $10,000 West Bend, Wisconsin, United States .0 17,800 Blue Harley-Davidson NO WARRANTY Touring ... NaN FALSE 100 13 271 OWNER Clear True TRUE 0.05 rows × 22 columnsdf = pd.read_csv('MotorcycleData.csv', encoding = 'gbk', na_values = 'Used')#把(Used)读成空值(NaN)df.head()Condition Condition_Desc Price Location Model_Year Mileage Exterior_Color Make Warranty Model ... Vehicle_Title OBO Feedback_Perc Watch_Count N_Reviews Seller_Status Vehicle_Tile Auction Buy_Now Bid_Count0 NaN mint!!! very low miles $11,412 McHenry, Illinois, United States .0 16,000 Black Harley-Davidson Unspecified Touring ... NaN FALSE 8.1 NaN 2427 Private Seller Clear True FALSE 28.01 NaN Perfect condition $17,200 Fort Recovery, Ohio, United States .0 60 Black Harley-Davidson Vehicle has an existing warranty Touring ... NaN FALSE 100 17 657 Private Seller Clear True TRUE 0.02 NaN NaN $3,872 Chicago, Illinois, United States 1970.0 25,763 Silver/Blue BMW Vehicle does NOT have an existing warranty R-Series ... NaN FALSE 100 NaN 136 NaN Clear True FALSE 26.03 NaN CLEAN TITLE READY TO RIDE HOME $6,575 Green Bay, Wisconsin, United States .0 33,142 Red Harley-Davidson NaN Touring ... NaN FALSE 100 NaN 2920 Dealer Clear True FALSE 11.04 NaN NaN $10,000 West Bend, Wisconsin, United States .0 17,800 Blue Harley-Davidson NO WARRANTY Touring ... NaN FALSE 100 13 271 OWNER Clear True TRUE 0.05 rows × 22 columnsdef f(x):if '$' in str(x):x = str(x).strip('$')#删除'$'字符x = str(x).replace(',','')#去掉逗号else:x = str(x).replace(',','')return float(x)df['Price'] = df['Price'].apply(f)df['Mileage'] = df['Mileage'].apply(f)df.head()Condition Condition_Desc Price Location Model_Year Mileage Exterior_Color Make Warranty Model ... Vehicle_Title OBO Feedback_Perc Watch_Count N_Reviews Seller_Status Vehicle_Tile Auction Buy_Now Bid_Count0 Used mint!!! very low miles 11412.0 McHenry, Illinois, United States .0 16000.0 Black Harley-Davidson Unspecified Touring ... NaN FALSE 8.1 NaN 2427 Private Seller Clear True FALSE 28.01 Used Perfect condition 17200.0 Fort Recovery, Ohio, United States .0 60.0 Black Harley-Davidson Vehicle has an existing warranty Touring ... NaN FALSE 100 17 657 Private Seller Clear True TRUE 0.02 Used NaN 3872.0 Chicago, Illinois, United States 1970.0 25763.0 Silver/Blue BMW Vehicle does NOT have an existing warranty R-Series ... NaN FALSE 100 NaN 136 NaN Clear True FALSE 26.03 Used CLEAN TITLE READY TO RIDE HOME 6575.0 Green Bay, Wisconsin, United States .0 33142.0 Red Harley-Davidson NaN Touring ... NaN FALSE 100 NaN 2920 Dealer Clear True FALSE 11.04 Used NaN 10000.0 West Bend, Wisconsin, United States .0 17800.0 Blue Harley-Davidson NO WARRANTY Touring ... NaN FALSE 100 13 271 OWNER Clear True TRUE 0.05 rows × 22 columnsdf.info()#价格和里程转化成了浮点型<class 'pandas.core.frame.DataFrame'>RangeIndex: 7493 entries, 0 to 7492Data columns (total 22 columns):Condition 7493 non-null objectCondition_Desc 1656 non-null objectPrice 7493 non-null float64Location7491 non-null objectModel_Year 7489 non-null float64Mileage 7467 non-null float64Exterior_Color 6778 non-null objectMake 7489 non-null objectWarranty5108 non-null objectModel 7370 non-null objectSub_Model 2426 non-null objectType 6011 non-null objectVehicle_Title268 non-null objectOBO7427 non-null objectFeedback_Perc6611 non-null objectWatch_Count 3517 non-null objectN_Reviews 7487 non-null objectSeller_Status6868 non-null objectVehicle_Tile7439 non-null objectAuction 7476 non-null objectBuy_Now 7256 non-null objectBid_Count 2190 non-null float64dtypes: float64(4), object(18)memory usage: 1.3+ MBpd.set_option('display.max_rows',100)#最多显示200行df.duplicated()#对每一行做判断,有没有重复0 False1 False2 False3 False4 False5 False6 False7 False8 False9 False10False11False12False13False14False15False16False17False18False19False20False21False22False23False24False25False26False27False28False29False30False31False32False33False34False35False36False37False38False39False40False41False42False43False44False45False46False47False48False49False... 7443 False7444 False7445 False7446 False7447 False7448 False7449 False7450 False7451 False7452 False7453 False7454 False7455 False7456 False7457 False7458 False7459 False7460 False7461 False7462 False7463 False7464 False7465 False7466 False7467 False7468 False7469 False7470 False7471 False7472 False7473 False7474 False7475 False7476 False7477 False7478 False7479 False7480 False7481 False7482 False7483 False7484 False7485 False7486 False7487 False7488 False7489 False7490 False7491 False7492 FalseLength: 7493, dtype: boolany(df.duplicated())#只要里面有一个重复的,就会返回TrueTruedf[df.duplicated()]#把重复的行展示出来Condition Condition_Desc Price Location Model_Year Mileage Exterior_Color Make Warranty Model ... Vehicle_Title OBO Feedback_Perc Watch_Count N_Reviews Seller_Status Vehicle_Tile Auction Buy_Now Bid_Count57 Used NaN 4050.0 Gilberts, Illinois, United States .0 6650.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Softail ... NaN FALSE NaN 7< 58 Private Seller Clear True TRUE 3.063 Used NaN 7300.0 Rolling Meadows, Illinois, United States 1997.0 20000.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Sportster ... NaN TRUE 100 5< 111 Private Seller Clear False TRUE NaN64 Used Dent and scratch free. Paint and chrome in exc... 5000.0 South Bend, Indiana, United States .0 1350.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Sportster ... NaN FALSE 100 14 37 Private Seller Clear False TRUE NaN67 Used NaN 3250.0 Valparaiso, Indiana, United States .0 22896.0 Blue/Green Metallic Harley-Davidson Vehicle does NOT have an existing warranty Sportster ... NaN FALSE 100 9< 109 Private Seller Clear True TRUE 11.0103 Used NaN 10995.0 Delafield, Wisconsin, United States 2002.0 4185.0 Blue Harley-Davidson Vehicle does NOT have an existing warranty Other ... NaN FALSE 100 NaN 91 Private Seller Clear False TRUE NaN152 Used SLING SHOT SL LIMITED EDITION!! BLACK WITH RED... 17000.0 Plainfield, Illinois, United States .0 11703.0 BLACK DIAMOND Other Makes Vehicle has an existing warranty SLINGSHOT ... NaN TRUE 100 31 390 Dealer Clear False TRUE NaN155 Used NaN 6950.0 Schenectady, New York, United States .0 65100.0 Burgundy Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 8< 1028 Dealer Clear False TRUE NaN156 Used NaN 19600.0 Pierre, South Dakota, United States .0 25976.0 NaN Harley-Davidson Vehicle has an existing warranty Touring ... NaN FALSE 100 NaN 40 NaN Clear True FALSE 59.0157 Used NaN 49441.0 Gastonia, North Carolina, United States .0 770.0 SILVER Harley-Davidson Vehicle has an existing warranty Touring ... NaN FALSE 100 19 1016 Dealer Clear False TRUE NaN201 Used NaN 2247.0 Shawano, Wisconsin, United States 1976.0 13161.0 Brown Kawasaki Vehicle does NOT have an existing warranty KZ ... NaN FALSE 100 NaN 9 Private Seller Clear True FALSE 15.0203 Used Excellent Condition. 13495.0 Zieglerville, Pennsylvania, United States .0 15466.0 Vivid Black Harley-Davidson Unspecified Touring ... NaN TRUE 100 42 297819 Dealer Clear False TRUE NaN204 New NaN 2887.0 South Haven, Michigan, United States .0 1.0 Green or Gray Kawasaki Vehicle has an existing warranty Z 125 Pro ... NaN FALSE 100 NaN 876 Dealer Clear True FALSE 0.0205 Used NaN 30663.0 Gastonia, North Carolina, United States .0 6988.0 APPLE RED CANDY Harley-Davidson Vehicle has an existing warranty Touring ... NaN FALSE 100 7< 1016 Dealer Clear False TRUE NaN219 Used NaN 1691.0 Lebanon, Pennsylvania, United States 1975.0 8603.0 NaN Kawasaki NaN Other ... NaN FALSE 100 NaN 210 NaN Clear True FALSE 14.0227 Used NaN 7500.0 Portland, Oregon, United States 1942.0 10000.0 black Harley-Davidson none Other ... NaN TRUE 7.8 26 120 NaN Clear False TRUE NaN232 Used NaN 12600.0 Rollinsford, New Hampshire, United States 1983.0 30.0 NaN Harley-Davidson NaN Other ... NaN FALSE 100 NaN 343 NaN Clear True FALSE 67.0250 Used Owned by a local collector/enthusiast, this is... 10900.0 Saint Louis, Missouri, United States .0 275.0 BLACK DENIM Harley-Davidson Vehicle has an existing warranty Softail ... NaN FALSE 100 10 65 Private Seller Clear True TRUE 3.0251 Used NaN 2000.0 Canoga Park, California, United States .0 90379.0 BLACK N WHITE BMW Vehicle has an existing warranty R-Series ... NaN FALSE >96 NaN 718 Dealer Clear True FALSE 10.0264 Used NaN 25927.0 Gastonia, North Carolina, United States .0 3755.0 BLACK & BLUE Harley-Davidson Vehicle has an existing warranty Softail ... NaN FALSE 100 14 1016 Dealer Clear False TRUE NaN269 Used Only 8,912 miles. Beautiful bike. Mint. Fully ... 13495.0 Zieglerville, Pennsylvania, United States .0 8912.0 Canyon Copper/Candy red Harley-Davidson Vehicle has an existing warranty Softail ... NaN TRUE 100 22 297819 Dealer Clear False TRUE NaN270 Used NaN 401.0 Osceola, Indiana, United States 1985.0 78000.0 Burgundy Honda NaN Other ... NaN FALSE 100 NaN 293 NaN Clear True FALSE 23.0275 Used NaN 6850.0 Rosedale, Maryland, United States .0 29956.0 Blue Harley-Davidson Vehicle does NOT have an existing warranty Softail ... NaN FALSE 9.1 7< 218 Dealer Clear False TRUE NaN279 Used NaN 12995.0 Hot Springs National Park, Arkansas, United St... .0 4946.0 Indian Smoke Red Harley-Davidson Vehicle does NOT have an existing warranty Softail ... NaN TRUE 100 15 247 Private Seller Clear False TRUE NaN281 Used NaN 5700.0 Des Plaines, Illinois, United States 1981.0 100.0 White Honda Unspecified Other ... NaN FALSE 100 18 778 Private Seller Clear True TRUE 0.0300 Used NaN 34000.0 Riverside, California, United States .0 7530.0 Yellow Harley-Davidson NaN Touring ... NaN FALSE 100 NaN 37 Private Seller Clear True FALSE 0.0306 Used NaN 9900.0 Bartlett, Illinois, United States .0 26500.0 Metallic black Honda Vehicle does NOT have an existing warranty Gold Wing ... NaN TRUE 100 11 2 Private Seller Clear False TRUE NaN350 Used Very clean, showroom condition 22500.0 Tampa, Florida, United States .0 19998.0 Blue Harley-Davidson NaN Touring ... NaN TRUE 100 31 1 Dealer Clear False TRUE NaN351 Used NaN 29900.0 Mahwah, New Jersey, United States .0 703.0 Atomic Red with Candy Apple Red Flames Harley-Davidson Vehicle has an existing warranty Touring ... NaN TRUE NaN 11 4 Private Seller Clear False TRUE NaN353 Used NaN 29883.0 Gastonia, North Carolina, United States .0 1835.0 ORANGE Harley-Davidson Vehicle has an existing warranty Touring ... NaN FALSE 100 6< 1016 Dealer Clear False TRUE NaN355 Used NaN 2650.0 Punta Gorda, Florida, United States .0 99546.0 Black Harley-Davidson NaN Touring ... NaN FALSE 100 NaN 22 Dealer Clear True FALSE 6.0... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...7154 New NaN 15199.0 Suncook, New Hampshire, United States .0 0.0 MATT GRAPHITE Triumph NaN Thunderbird ... NaN TRUE 100 NaN 1978 Dealer Clear False FALSE NaN7163 New NaN 10400.0 Suncook, New Hampshire, United States .0 0.0 JET BLACK Triumph NaN Bonneville ... NaN TRUE 100 NaN 1978 Dealer Clear False FALSE NaN7164 New NaN 10999.0 Suncook, New Hampshire, United States .0 0.0 PURE WHITE Triumph NaN THRUXTON ... NaN FALSE 100 NaN 1978 Dealer Clear False FALSE NaN7165 New NaN 10499.0 Suncook, New Hampshire, United States .0 0.0 LAVA RED Triumph NaN Thunderbird ... NaN TRUE 100 NaN 1978 Dealer Clear False FALSE NaN7167 New NaN 9250.0 Suncook, New Hampshire, United States .0 0.0 CRYSTAL WHITE Triumph NaN STREET TWIN W/ABS ... NaN TRUE 100 NaN 1978 Dealer Clear False FALSE NaN7176 New NaN 13250.0 Suncook, New Hampshire, United States .0 0.0 COMPETITION GREEN W/GOLD TANK STRIPE Triumph NaN THRUXTON ... NaN FALSE 100 NaN 1978 Dealer Clear False FALSE NaN7178 New NaN 10499.0 Suncook, New Hampshire, United States .0 0.0 JET BLACK Triumph NaN Thunderbird ... NaN TRUE 100 NaN 1978 Dealer Clear False FALSE NaN7200 New NaN 9250.0 Suncook, New Hampshire, United States .0 0.0 MATTE BLACK Triumph NaN STREET TWIN W/ABS ... NaN TRUE 100 NaN 1978 Dealer Clear False FALSE NaN7201 Used NaN 6891.0 McKinney, Texas, United States .0 7288.0 Silver Yamaha Unspecified FZ ... NaN TRUE >50 NaN 397 Dealer Clear False FALSE NaN7211 New NaN 19840.0 Plano, Texas, United States .0 0.0 White BMW Unspecified S 1000 RR Premium Race LightWhite/LupinBlueMet... ... NaN FALSE 100 NaN 161 Dealer Clear False FALSE NaN7238 New NaN 10500.0 Suncook, New Hampshire, United States .0 0.0 JET BLACK/SILVER ICE Triumph NaN Street Cup ... NaN FALSE 100 NaN 1978 Dealer Clear False FALSE NaN7240 New NaN 10500.0 Suncook, New Hampshire, United States .0 0.0 RACING YELLOW/SILVER ICE Triumph NaN Street Cup ... NaN FALSE 100 NaN 1978 Dealer Clear False FALSE NaN7250 New NaN 10550.0 Plano, Texas, United States .0 0.0 Black Triumph Unspecified Bonneville T100 Black Matte Black ... NaN FALSE 100 NaN 161 Dealer Clear False FALSE NaN7251 New NaN 10800.0 Plano, Texas, United States .0 0.0 White Triumph Unspecified Bonneville T100 Fusion White/Aegean Blue ... NaN FALSE 100 NaN 161 Dealer Clear False FALSE NaN7255 New NaN 14995.0 Plano, Texas, United States .0 7.0 Red Ducati Unspecified Multistrada 1200 ... NaN FALSE 100 NaN 161 Dealer Clear False FALSE NaN7259 New NaN 23495.0 Plano, Texas, United States .0 0.0 Gray Ducati Unspecified Multistrada 1200 Enduro Phantom Grey ... NaN FALSE 100 NaN 161 Dealer Clear False FALSE NaN7260 New NaN 10550.0 Plano, Texas, United States .0 0.0 Black Triumph Unspecified Bonneville T100 Black Matte Black ... NaN FALSE 100 NaN 161 Dealer Clear False FALSE NaN7272 New NaN 9999.0 Plano, Texas, United States .0 7.0 Yellow Ducati Unspecified Scrambler Flat Track Pro ... NaN FALSE 100 NaN 161 Dealer Clear False FALSE NaN7273 New NaN 10800.0 Plano, Texas, United States .0 0.0 White Triumph Unspecified Bonneville T100 Fusion White/Aegean Blue ... NaN FALSE 100 NaN 161 Dealer Clear False FALSE NaN7288 New NaN 9250.0 Plano, Texas, United States .0 7.0 Red Triumph Unspecified Street Twin Matte Jet Black ... NaN FALSE 100 NaN 161 Dealer Clear False FALSE NaN7293 New NaN 25134.0 Goldsboro, North Carolina, United States .0 0.0 Gray Can-Am Unspecified Spyder RT-S ... NaN TRUE 100 NaN 60 Dealer Clear False FALSE NaN7300 New NaN 20700.0 Plano, Texas, United States .0 7.0 White Triumph Unspecified Tiger Explorer XCX Crystal燱hite ... NaN FALSE 100 NaN 161 Dealer Clear False FALSE NaN7315 New NaN 10800.0 Plano, Texas, United States .0 0.0 White Triumph Unspecified Bonneville T100 Fusion White/Aegean Blue ... NaN FALSE 100 NaN 161 Dealer Clear False FALSE NaN7317 New NaN 27327.0 Goldsboro, North Carolina, United States .0 0.0 Blue Can-Am Unspecified Spyder RT Limited ... NaN TRUE 100 NaN 60 Dealer Clear False FALSE NaN7318 New NaN 13795.0 Plano, Texas, United States .0 7.0 Red Ducati Unspecified Monster 1200 S Red ... NaN FALSE 100 NaN 161 Dealer Clear False FALSE NaN7319 New NaN 11695.0 Plano, Texas, United States .0 7.0 Red Ducati Unspecified Monster 821 Red ... NaN FALSE 100 NaN 161 Dealer Clear False FALSE NaN7384 New NaN 26999.0 Greensboro, North Carolina, United States .0 3.0 Black Indian Unspecified Roadmaster? ... TRUE 100 NaN 312 Dealer Clear FALSE False NaN NaN7389 New NaN 18999.0 Greensboro, North Carolina, United States .0 3.0 Green Indian Unspecified Chief?Vintage ... NaN TRUE 100 NaN 312 Dealer Clear False FALSE NaN7402 Used NaN 5200.0 Raymond, New Hampshire, United States .0 5307.0 Black Suzuki NaN GSX-R750 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7403 Used Please feel free to contact me if you have any... 4900.0 Raymond, New Hampshire, United States .0 22931.0 Gray Suzuki NaN GSX-R ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN1221 rows × 22 columnsdf[df['Price'] == 4050.0]Condition Condition_Desc Price Location Model_Year Mileage Exterior_Color Make Warranty Model ... Vehicle_Title OBO Feedback_Perc Watch_Count N_Reviews Seller_Status Vehicle_Tile Auction Buy_Now Bid_Count49 Used NaN 4050.0 Gilberts, Illinois, United States .0 6650.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Softail ... NaN FALSE NaN 7< 58 Private Seller Clear True TRUE 3.057 Used NaN 4050.0 Gilberts, Illinois, United States .0 6650.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Softail ... NaN FALSE NaN 7< 58 Private Seller Clear True TRUE 3.0747 Used NaN 4050.0 Coventry, Rhode Island, United States .0 17800.0 Blue Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 5< 198 Private Seller Clear True TRUE 7.0829 Used NaN 4050.0 Coventry, Rhode Island, United States .0 17800.0 Blue Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 5< 198 Private Seller Clear True TRUE 7.0914 Used NaN 4050.0 Scott City, Missouri, United States .0 3591.0 Blue Harley-Davidson Vehicle has an existing warranty Softail Slim ... NaN FALSE 100 NaN 4 Dealer Clear True FALSE 29.0982 Used NaN 4050.0 San Diego, California, United States 2001.0 15134.0 Orange Harley-Davidson Vehicle does NOT have an existing warranty Softail ... NaN FALSE 100 NaN 46 NaN Clear True FALSE 13.01989 Used NaN 4050.0 New Hampton, Iowa, United States 1950.0 2.0 Black Other Makes Vehicle does NOT have an existing warranty AJS 500 18 Single ... NaN FALSE 100 NaN 570 NaN Clear True FALSE 2.02070 Used NaN 4050.0 New Hampton, Iowa, United States 1950.0 2.0 Black Other Makes Vehicle does NOT have an existing warranty AJS 500 18 Single ... NaN FALSE 100 NaN 570 NaN Clear True FALSE 2.02249 Used NaN 4050.0 Pinellas Park, Florida, United States .0 33797.0 Black Harley-Davidson No Warranty Touring ... NaN FALSE 9.5 NaN 767 Dealer Clear True FALSE 29.02313 Used NaN 4050.0 Pinellas Park, Florida, United States .0 33797.0 Black Harley-Davidson No Warranty Touring ... NaN FALSE 9.5 NaN 767 Dealer Clear True FALSE 29.03116 Used NaN 4050.0 Elmhurst, Illinois, United States 2001.0 45500.0 Burgundy Honda Vehicle does NOT have an existing warranty Goldwing ... NaN FALSE NaN 19 0 Private Seller Clear True TRUE 7.03787 New NaN 4050.0 Boston, Massachusetts, United States .0 13000.0 Black Ducati Vehicle does NOT have an existing warranty Superbike ... NaN FALSE 1.7 11 52 Private Seller Clear True TRUE 23.03852 New NaN 4050.0 Boston, Massachusetts, United States .0 13000.0 Black Ducati Vehicle does NOT have an existing warranty Superbike ... NaN FALSE 1.7 11 52 Private Seller Clear True TRUE 23.04224 Used NaN 4050.0 Suncook, New Hampshire, United States 2001.0 22523.0 Orange Harley-Davidson NaN FLSTF FAT BOY ... NaN FALSE 100 NaN 1978 Dealer Clear True FALSE 10.04344 Used NaN 4050.0 Suncook, New Hampshire, United States .0 42706.0 GREEN/BLACK Harley-Davidson NaN FLHRC ROAD KING CLASSIC ... NaN FALSE 100 NaN 1978 Dealer Clear True FALSE 11.04386 Used NaN 4050.0 Suncook, New Hampshire, United States .0 42706.0 GREEN/BLACK Harley-Davidson NaN FLHRC ROAD KING CLASSIC ... NaN FALSE 100 NaN 1978 Dealer Clear True FALSE 11.016 rows × 22 columnsnp.sum(df.duplicated())1221df.drop_duplicates()#数据去重,返回去重后的视图,原始数据没有被改变Condition Condition_Desc Price Location Model_Year Mileage Exterior_Color Make Warranty Model ... Vehicle_Title OBO Feedback_Perc Watch_Count N_Reviews Seller_Status Vehicle_Tile Auction Buy_Now Bid_Count0 Used mint!!! very low miles 11412.0 McHenry, Illinois, United States .0 16000.0 Black Harley-Davidson Unspecified Touring ... NaN FALSE 8.1 NaN 2427 Private Seller Clear True FALSE 28.01 Used Perfect condition 17200.0 Fort Recovery, Ohio, United States .0 60.0 Black Harley-Davidson Vehicle has an existing warranty Touring ... NaN FALSE 100 17 657 Private Seller Clear True TRUE 0.02 Used NaN 3872.0 Chicago, Illinois, United States 1970.0 25763.0 Silver/Blue BMW Vehicle does NOT have an existing warranty R-Series ... NaN FALSE 100 NaN 136 NaN Clear True FALSE 26.03 Used CLEAN TITLE READY TO RIDE HOME 6575.0 Green Bay, Wisconsin, United States .0 33142.0 Red Harley-Davidson NaN Touring ... NaN FALSE 100 NaN 2920 Dealer Clear True FALSE 11.04 Used NaN 10000.0 West Bend, Wisconsin, United States .0 17800.0 Blue Harley-Davidson NO WARRANTY Touring ... NaN FALSE 100 13 271 OWNER Clear True TRUE 0.05 Used It's a '72 in good shape 1500.0 Watervliet, Michigan, United States 1972.0 0.0 Red Harley-Davidson Vehicle does NOT have an existing warranty Sportster ... NaN FALSE 100 NaN 412 Private Seller Clear True FALSE 1.06 Used NaN 24900.0 Sterling, Illinois, United States .0 5548.0 Grey / Red / Silver Metallic Harley-Davidson NaN Touring ... NaN FALSE 9.8 NaN 6229 Dealer Clear True FALSE 1.07 Used NaN 1400.0 Williamston, Michigan, United States 1975.0 17868.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Sportster ... NaN FALSE 9.7 NaN 1159 Private Seller Clear True FALSE 6.08 Used NaN 5100.0 Palatine, Illinois, United States .0 2800.0 Cherry Red Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE NaN 16 3 Private Seller Clear True TRUE 6.09 Used NaN 8000.0 Chicago, Illinois, United States .0 3000.0 Black Harley-Davidson Vehicle has an existing warranty Sportster ... NaN FALSE NaN NaN 1 Private Seller Clear True FALSE 0.010 Used NaN 2125.0 Williamston, Michigan, United States 1978.0 30.0 Burgundy Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 9.7 NaN 1159 Private Seller Clear True FALSE 4.011 Used NaN 11100.0 Oak Park, Illinois, United States .0 5800.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 NaN 83 Private Seller Clear True FALSE 21.012 Used NaN 1125.0 Pewaukee, Wisconsin, United States 2002.0 55000.0 RICH RED W/STRIPES Harley-Davidson Vehicle does NOT have an existing warranty Other ... NaN FALSE 100 NaN 128 Private Seller Clear True FALSE 5.013 Used Overall, this bike is in good condition for it... 3550.0 Madison, Wisconsin, United States 2000.0 57898.0 Luxury Rich Red Harley-Davidson Vehicle does NOT have an existing warranty. AS... Touring ... NaN FALSE 100 NaN 10701 Dealer Clear True FALSE 2.014 Used NaN 5500.0 Davenport, Iowa, United States .0 22102.0 NaN Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 9.3 NaN 244 Private Seller Clear True FALSE 16.015 Used NaN 9000.0 Plymouth, Indiana, United States .0 7792.0 Red Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 NaN 299 Private Seller Clear True FALSE 3.016 Used NaN 8100.0 Goshen, Indiana, United States 1973.0 9305.0 White Harley-Davidson Vehicle does NOT have an existing warranty Other ... NaN FALSE 100 NaN 300 Private Seller Clear True FALSE 25.017 Used Absolutely perfect condition 14000.0 Plainfield, Indiana, United States .0 1125.0 Blue Harley-Davidson Vehicle has an existing warranty Softail ... NaN FALSE 100 NaN 170 Private Seller Clear True FALSE 0.018 Used NaN 20000.0 Bellevue, Iowa, United States .0 5500.0 Red Harley-Davidson Vehicle has an existing warranty Touring ... NaN TRUE 100 8< 66 Private Seller Clear False TRUE NaN19 New NaN 13000.0 Des Plaines, Illinois, United States .0 250.0 Black Harley-Davidson Unspecified Softail ... NaN FALSE 100 23 181 Private Seller Clear True TRUE 0.020 New NaN 10900.0 Ottawa, Illinois, United States .0 140.0 Black Harley-Davidson Vehicle has an existing warranty Touring ... NaN TRUE 100 NaN 3172 Private Seller Clear False TRUE NaN21 Used IN AWESOME CONDITION. SUPER RARE. JUST SERVIC... 9999.0 Orland Park, Illinois, United States .0 25405.0 Black Harley-Davidson NaN Softail ... NaN FALSE 100 NaN 283 Dealer Clear True FALSE 0.022 Used NaN 5700.0 Cross Plains, Wisconsin, United States 1982.0 28888.0 Black & Blue Harley-Davidson NaN Other ... NaN FALSE 100 NaN 947 Private Seller Clear True FALSE 0.023 Used NaN 7400.0 Watervliet, Michigan, United States 2001.0 23658.0 Purple Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 NaN 412 Private Seller Clear True FALSE 0.024 Used NaN 26500.0 Kewanee, Illinois, United States .0 13089.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN TRUE 100 15 6 Private Seller Clear False TRUE NaN25 Used NaN 9850.0 Chicago, Illinois, United States .0 23546.0 Blue Harley-Davidson NaN Touring ... NaN FALSE 100 NaN 12 Private Seller Clear True FALSE 0.026 Used NaN 45900.0 South Haven, Michigan, United States .0 40000.0 Red Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 25 199 Private Seller Clear False TRUE NaN27 Used Almost new Harley-Davidson FLHR Road Ki... 10600.0 Wheeling, Illinois, United States .0 3769.0 Red Hot Sun Glo Harley-Davidson NaN Touring ... NaN TRUE 100 22 175 Private Seller Clear False TRUE NaN28 Used * Harley Davidson Rocker C *Chrome Chrome ... 12000.0 Chicago, Illinois, United States .0 8700.0 Burgundy Harley-Davidson Vehicle does NOT have an existing warranty Softail ... NaN FALSE 100 NaN 11 Private Seller Clear True FALSE 0.029 Used NaN 20000.0 Chicago, Illinois, United States .0 16827.0 Black Harley-Davidson NaN TRIKE ... NaN TRUE NaN 31 17 Private Seller Clear False TRUE NaN30 Used Very clean and well maintained 25000.0 Summit-Argo, Illinois, United States .0 15000.0 Kandy brandywine Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 1< 18 Private Seller Clear True TRUE 0.031 Used NaN 20000.0 Coldwater, Michigan, United States .0 2900.0 Blue Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 NaN 142 Private Seller Clear True FALSE 0.032 Used NaN 11000.0 Elkhart, Indiana, United States .0 15200.0 Red Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN TRUE NaN 12 28 Private Seller Clear False TRUE NaN33 Used NaN 8500.0 Glenview NAS, Illinois, United States .0 10319.0 Black Harley-Davidson NaN Touring ... NaN TRUE 100 8< 324 Private Seller Clear False TRUE NaN34 Used NaN 18000.0 Fox River Grove, Illinois, United States .0 29544.0 Blue Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN TRUE 100 NaN 111 Private Seller Clear False TRUE NaN35 Used NaN 7700.0 Roselle, Illinois, United States .0 10893.0 NaN Harley-Davidson NaN Other ... NaN FALSE 100 NaN 236 NaN Clear False TRUE NaN36 Used NaN 2750.0 Belvidere, Illinois, United States .0 35735.0 Black Harley-Davidson Vehicle does NOT have an existing warranty FLH ... NaN FALSE 100 NaN 100 Belvidere Police Department Clear True FALSE 19.037 Used Year ManufacturerHarley-Davidson ModelScre... 10895.0 Kalamazoo, Michigan, United States .0 9908.0 Red Harley-Davidson NaN Softail ... NaN FALSE 100 NaN 1522 Private Seller Clear True FALSE 0.038 Used No Reserve! 6700.0 Tinley Park, Illinois, United States .0 8950.0 Burgundy Harley-Davidson Vehicle does NOT have an existing warranty Softail ... NaN FALSE 100 NaN 126 Private Seller Clear True FALSE 0.039 Used NaN 18000.0 Batavia, Illinois, United States .0 5600.0 Black Harley-Davidson Vehicle has an existing warranty Touring ... NaN FALSE 100 NaN 63 Private Seller Clear True FALSE 0.040 Used NaN 7300.0 Rolling Meadows, Illinois, United States 1997.0 20000.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Sportster ... NaN TRUE 100 5< 111 Private Seller Clear False TRUE NaN41 Used NaN 6800.0 Hampshire, Illinois, United States .0 55782.0 NaN Harley-Davidson Vehicle does NOT have an existing warranty Softail ... NaN TRUE 100 2< 298 Private Seller Clear False TRUE NaN42 Used Dent and scratch free. Paint and chrome in exc... 5000.0 South Bend, Indiana, United States .0 1350.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Sportster ... NaN FALSE 100 14 37 Private Seller Clear False TRUE NaN43 Used Excellent condition gently used. Adult driven 13200.0 Algonquin, Illinois, United States .0 15400.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 NaN 478 Private Seller Clear True FALSE 0.044 Used Excellent condition 11400.0 Indianapolis, Indiana, United States .0 1533.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 4< 79 Dealer Clear False TRUE NaN45 Used NaN 3250.0 Valparaiso, Indiana, United States .0 22896.0 Blue/Green Metallic Harley-Davidson Vehicle does NOT have an existing warranty Sportster ... NaN FALSE 100 9< 109 Private Seller Clear True TRUE 11.046 Used This is a nice looking Road King. Paint and ch... 8000.0 Madison, Wisconsin, United States .0 24742.0 Vivid Black Harley-Davidson Vehicle does NOT have an existing warranty. AS... Touring ... NaN FALSE 100 NaN 10701 Dealer Clear True FALSE 0.047 Used NaN 17800.0 Webberville, Michigan, United States .0 1500.0 Black Harley-Davidson Vehicle has an existing warranty Touring ... NaN TRUE 100 4< 33 Private Seller Clear False TRUE NaN48 Used NaN 8500.0 Rockford, Illinois, United States .0 51000.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN TRUE 100 8< 124 Private Seller Clear False TRUE NaN49 Used NaN 4050.0 Gilberts, Illinois, United States .0 6650.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Softail ... NaN FALSE NaN 7< 58 Private Seller Clear True TRUE 3.0... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...7443 Used NaN 7900.0 Raymond, New Hampshire, United States .0 0.0 Black Harley-Davidson NaN FXDBI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7444 Used NaN 5900.0 Raymond, New Hampshire, United States .0 7337.0 Gray Yamaha NaN YZF-R6 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7445 Used NaN 3900.0 Raymond, New Hampshire, United States .0 2669.0 Red Harley-Davidson NaN XG750 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7446 Used NaN 7900.0 Raymond, New Hampshire, United States .0 23440.0 Gray Kawasaki NaN Z1000 G ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7447 Used NaN 23499.0 Suncook, New Hampshire, United States .0 16927.0 Black Harley-Davidson NaN FLHTK ELECTRA GLIDE ULTRA LIMITED ... NaN TRUE 100 NaN 1978 Dealer Clear False FALSE NaN7448 Used Please feel free to contact me if you have any... 6500.0 Raymond, New Hampshire, United States .0 29541.0 Burgundy Harley-Davidson NaN Touring ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7449 Used NaN 6500.0 Raymond, New Hampshire, United States .0 11388.0 Black Harley-Davidson NaN FXDF ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7450 Used NaN 3900.0 Raymond, New Hampshire, United States .0 28117.0 Black Kawasaki NaN ZX-10R ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7451 Used NaN 5200.0 Raymond, New Hampshire, United States .0 12876.0 maroon Suzuki NaN GSX1300R ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7452 Used NaN 3900.0 Raymond, New Hampshire, United States .0 66219.0 Blue Harley-Davidson NaN FXD ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7453 Used Please feel free to contact me if you have any... 8300.0 Raymond, New Hampshire, United States .0 5468.0 TWO TONE Harley-Davidson NaN Softail ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7454 Used NaN 7400.0 Raymond, New Hampshire, United States .0 12333.0 Red Harley-Davidson NaN FLD103 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7455 Used NaN 4700.0 Raymond, New Hampshire, United States .0 424.0 Black Suzuki NaN GSX-S750 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7456 Used NaN 4900.0 Raymond, New Hampshire, United States .0 7552.0 Orange Yamaha NaN YZF-R6 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7457 Used NaN 8500.0 Raymond, New Hampshire, United States .0 0.0 Black Harley-Davidson NaN FXCW ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7458 Used NaN 9200.0 Raymond, New Hampshire, United States .0 0.0 Blue Harley-Davidson NaN FLTRX ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7459 Used NaN 3900.0 Raymond, New Hampshire, United States .0 19268.0 Black Harley-Davidson NaN FXD ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7460 Used NaN 7500.0 Raymond, New Hampshire, United States .0 703.0 Black Suzuki NaN GSX-R1000 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7461 Used NaN 4200.0 Raymond, New Hampshire, United States .0 5883.0 Gray Yamaha NaN XV1700 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7462 Used NaN 6500.0 Raymond, New Hampshire, United States .0 32267.0 Blue Harley-Davidson NaN FLSTFI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7463 Used NaN 7800.0 Raymond, New Hampshire, United States .0 45135.0 Orange Harley-Davidson NaN FLHTCUI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7464 Used NaN 4400.0 Raymond, New Hampshire, United States .0 2059.0 Black Suzuki NaN GSX-S750 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7465 Used NaN 7900.0 Raymond, New Hampshire, United States .0 11679.0 Black Harley-Davidson NaN FXDCI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7466 Used NaN 6500.0 Raymond, New Hampshire, United States .0 1389.0 Blue Suzuki NaN GSX-R600 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7467 Used Salvage Rebuildable Repairable No Reserve NR 7400.0 Raymond, New Hampshire, United States .0 41618.0 Blue Harley-Davidson NaN Touring ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7468 Used NaN 8800.0 Raymond, New Hampshire, United States .0 52418.0 White Harley-Davidson NaN FLHXI ... NaN TRUE 4.7 NaN 12409 Dealer Rebuilt, Rebuildable & Reconstructed False FALSE NaN7469 Used NaN 13570.0 Scott City, Missouri, United States .0 .0 Black Harley-Davidson Vehicle has an existing warranty Dyna Fat Bob ... NaN FALSE 100 NaN 4 Dealer Clear False FALSE NaN7470 Used NaN 7900.0 Raymond, New Hampshire, United States .0 64724.0 White Harley-Davidson NaN FLHTCUI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7471 Used NaN 6200.0 Raymond, New Hampshire, United States .0 55993.0 Red Harley-Davidson NaN FLHTCI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7472 Used NaN 7500.0 Raymond, New Hampshire, United States .0 32560.0 TWO TONE Harley-Davidson NaN FLSTNI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7473 Used NaN 5500.0 Raymond, New Hampshire, United States 2000.0 87123.0 White Harley-Davidson NaN FLSTC ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7474 Used NaN 3400.0 Raymond, New Hampshire, United States .0 23865.0 Blue Harley-Davidson NaN XL 883C ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7475 Used NaN 3900.0 Raymond, New Hampshire, United States .0 56633.0 Blue Harley-Davidson NaN FXD ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7476 Used NaN 8500.0 Raymond, New Hampshire, United States .0 36780.0 Blue Harley-Davidson NaN FLHTCUI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7477 Used NaN 4900.0 Raymond, New Hampshire, United States 2002.0 22709.0 Black Harley-Davidson NaN FXDL ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7478 Used NaN 9900.0 Raymond, New Hampshire, United States .0 20851.0 Brown Harley-Davidson NaN FLTRU ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7479 Used NaN 2900.0 Raymond, New Hampshire, United States .0 2905.0 Black Suzuki NaN SV ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7480 Used NaN 6500.0 Raymond, New Hampshire, United States .0 1701.0 Green Harley-Davidson NaN XL 883N ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7481 Used NaN 10500.0 Raymond, New Hampshire, United States .0 16231.0 Black Harley-Davidson NaN FLTRX ... NaN TRUE 4.7 NaN 12409 Dealer Rebuilt, Rebuildable & Reconstructed False FALSE NaN7482 Used NaN 7200.0 Raymond, New Hampshire, United States .0 29201.0 Black Harley-Davidson NaN FLTRI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7483 Used NaN 7500.0 Raymond, New Hampshire, United States .0 28716.0 Purple Harley-Davidson NaN FLHRCI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7484 Used NaN 5000.0 Raymond, New Hampshire, United States .0 12583.0 NaN Harley-Davidson NaN FXDI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7485 Used NaN 5000.0 Raymond, New Hampshire, United States .0 19931.0 Black Harley-Davidson NaN FXDI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7486 Used NaN 8900.0 Raymond, New Hampshire, United States .0 9305.0 Black Harley-Davidson NaN FXDWG ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7487 Used Please feel free to contact me if you have any... 4900.0 Raymond, New Hampshire, United States .0 3475.0 Gray Suzuki NaN Boulevard ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7488 Used NaN 3900.0 Raymond, New Hampshire, United States .0 23681.0 Black Harley-Davidson NaN FXDI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7489 Used NaN 8900.0 Raymond, New Hampshire, United States .0 5821.0 Black Suzuki NaN GSX1300RA ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7490 Used NaN 7800.0 Raymond, New Hampshire, United States .0 48616.0 Red BMW NaN R1200GS ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7491 Used NaN 7900.0 Raymond, New Hampshire, United States .0 6185.0 TWO TONE Yamaha NaN YZF-R1 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7492 Used NaN 12970.0 Scott City, Missouri, United States .0 448.0 Gray Harley-Davidson Vehicle has an existing warranty Dyna Street Bob ... NaN FALSE 100 NaN 4 Dealer Clear False FALSE NaN6272 rows × 22 columnsdf.drop_duplicates(inplace = True)dfCondition Condition_Desc Price Location Model_Year Mileage Exterior_Color Make Warranty Model ... Vehicle_Title OBO Feedback_Perc Watch_Count N_Reviews Seller_Status Vehicle_Tile Auction Buy_Now Bid_Count0 Used mint!!! very low miles 11412.0 McHenry, Illinois, United States .0 16000.0 Black Harley-Davidson Unspecified Touring ... NaN FALSE 8.1 NaN 2427 Private Seller Clear True FALSE 28.01 Used Perfect condition 17200.0 Fort Recovery, Ohio, United States .0 60.0 Black Harley-Davidson Vehicle has an existing warranty Touring ... NaN FALSE 100 17 657 Private Seller Clear True TRUE 0.02 Used NaN 3872.0 Chicago, Illinois, United States 1970.0 25763.0 Silver/Blue BMW Vehicle does NOT have an existing warranty R-Series ... NaN FALSE 100 NaN 136 NaN Clear True FALSE 26.03 Used CLEAN TITLE READY TO RIDE HOME 6575.0 Green Bay, Wisconsin, United States .0 33142.0 Red Harley-Davidson NaN Touring ... NaN FALSE 100 NaN 2920 Dealer Clear True FALSE 11.04 Used NaN 10000.0 West Bend, Wisconsin, United States .0 17800.0 Blue Harley-Davidson NO WARRANTY Touring ... NaN FALSE 100 13 271 OWNER Clear True TRUE 0.05 Used It's a '72 in good shape 1500.0 Watervliet, Michigan, United States 1972.0 0.0 Red Harley-Davidson Vehicle does NOT have an existing warranty Sportster ... NaN FALSE 100 NaN 412 Private Seller Clear True FALSE 1.06 Used NaN 24900.0 Sterling, Illinois, United States .0 5548.0 Grey / Red / Silver Metallic Harley-Davidson NaN Touring ... NaN FALSE 9.8 NaN 6229 Dealer Clear True FALSE 1.07 Used NaN 1400.0 Williamston, Michigan, United States 1975.0 17868.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Sportster ... NaN FALSE 9.7 NaN 1159 Private Seller Clear True FALSE 6.08 Used NaN 5100.0 Palatine, Illinois, United States .0 2800.0 Cherry Red Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE NaN 16 3 Private Seller Clear True TRUE 6.09 Used NaN 8000.0 Chicago, Illinois, United States .0 3000.0 Black Harley-Davidson Vehicle has an existing warranty Sportster ... NaN FALSE NaN NaN 1 Private Seller Clear True FALSE 0.010 Used NaN 2125.0 Williamston, Michigan, United States 1978.0 30.0 Burgundy Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 9.7 NaN 1159 Private Seller Clear True FALSE 4.011 Used NaN 11100.0 Oak Park, Illinois, United States .0 5800.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 NaN 83 Private Seller Clear True FALSE 21.012 Used NaN 1125.0 Pewaukee, Wisconsin, United States 2002.0 55000.0 RICH RED W/STRIPES Harley-Davidson Vehicle does NOT have an existing warranty Other ... NaN FALSE 100 NaN 128 Private Seller Clear True FALSE 5.013 Used Overall, this bike is in good condition for it... 3550.0 Madison, Wisconsin, United States 2000.0 57898.0 Luxury Rich Red Harley-Davidson Vehicle does NOT have an existing warranty. AS... Touring ... NaN FALSE 100 NaN 10701 Dealer Clear True FALSE 2.014 Used NaN 5500.0 Davenport, Iowa, United States .0 22102.0 NaN Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 9.3 NaN 244 Private Seller Clear True FALSE 16.015 Used NaN 9000.0 Plymouth, Indiana, United States .0 7792.0 Red Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 NaN 299 Private Seller Clear True FALSE 3.016 Used NaN 8100.0 Goshen, Indiana, United States 1973.0 9305.0 White Harley-Davidson Vehicle does NOT have an existing warranty Other ... NaN FALSE 100 NaN 300 Private Seller Clear True FALSE 25.017 Used Absolutely perfect condition 14000.0 Plainfield, Indiana, United States .0 1125.0 Blue Harley-Davidson Vehicle has an existing warranty Softail ... NaN FALSE 100 NaN 170 Private Seller Clear True FALSE 0.018 Used NaN 20000.0 Bellevue, Iowa, United States .0 5500.0 Red Harley-Davidson Vehicle has an existing warranty Touring ... NaN TRUE 100 8< 66 Private Seller Clear False TRUE NaN19 New NaN 13000.0 Des Plaines, Illinois, United States .0 250.0 Black Harley-Davidson Unspecified Softail ... NaN FALSE 100 23 181 Private Seller Clear True TRUE 0.020 New NaN 10900.0 Ottawa, Illinois, United States .0 140.0 Black Harley-Davidson Vehicle has an existing warranty Touring ... NaN TRUE 100 NaN 3172 Private Seller Clear False TRUE NaN21 Used IN AWESOME CONDITION. SUPER RARE. JUST SERVIC... 9999.0 Orland Park, Illinois, United States .0 25405.0 Black Harley-Davidson NaN Softail ... NaN FALSE 100 NaN 283 Dealer Clear True FALSE 0.022 Used NaN 5700.0 Cross Plains, Wisconsin, United States 1982.0 28888.0 Black & Blue Harley-Davidson NaN Other ... NaN FALSE 100 NaN 947 Private Seller Clear True FALSE 0.023 Used NaN 7400.0 Watervliet, Michigan, United States 2001.0 23658.0 Purple Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 NaN 412 Private Seller Clear True FALSE 0.024 Used NaN 26500.0 Kewanee, Illinois, United States .0 13089.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN TRUE 100 15 6 Private Seller Clear False TRUE NaN25 Used NaN 9850.0 Chicago, Illinois, United States .0 23546.0 Blue Harley-Davidson NaN Touring ... NaN FALSE 100 NaN 12 Private Seller Clear True FALSE 0.026 Used NaN 45900.0 South Haven, Michigan, United States .0 40000.0 Red Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 25 199 Private Seller Clear False TRUE NaN27 Used Almost new Harley-Davidson FLHR Road Ki... 10600.0 Wheeling, Illinois, United States .0 3769.0 Red Hot Sun Glo Harley-Davidson NaN Touring ... NaN TRUE 100 22 175 Private Seller Clear False TRUE NaN28 Used * Harley Davidson Rocker C *Chrome Chrome ... 12000.0 Chicago, Illinois, United States .0 8700.0 Burgundy Harley-Davidson Vehicle does NOT have an existing warranty Softail ... NaN FALSE 100 NaN 11 Private Seller Clear True FALSE 0.029 Used NaN 20000.0 Chicago, Illinois, United States .0 16827.0 Black Harley-Davidson NaN TRIKE ... NaN TRUE NaN 31 17 Private Seller Clear False TRUE NaN30 Used Very clean and well maintained 25000.0 Summit-Argo, Illinois, United States .0 15000.0 Kandy brandywine Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 1< 18 Private Seller Clear True TRUE 0.031 Used NaN 20000.0 Coldwater, Michigan, United States .0 2900.0 Blue Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 NaN 142 Private Seller Clear True FALSE 0.032 Used NaN 11000.0 Elkhart, Indiana, United States .0 15200.0 Red Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN TRUE NaN 12 28 Private Seller Clear False TRUE NaN33 Used NaN 8500.0 Glenview NAS, Illinois, United States .0 10319.0 Black Harley-Davidson NaN Touring ... NaN TRUE 100 8< 324 Private Seller Clear False TRUE NaN34 Used NaN 18000.0 Fox River Grove, Illinois, United States .0 29544.0 Blue Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN TRUE 100 NaN 111 Private Seller Clear False TRUE NaN35 Used NaN 7700.0 Roselle, Illinois, United States .0 10893.0 NaN Harley-Davidson NaN Other ... NaN FALSE 100 NaN 236 NaN Clear False TRUE NaN36 Used NaN 2750.0 Belvidere, Illinois, United States .0 35735.0 Black Harley-Davidson Vehicle does NOT have an existing warranty FLH ... NaN FALSE 100 NaN 100 Belvidere Police Department Clear True FALSE 19.037 Used Year ManufacturerHarley-Davidson ModelScre... 10895.0 Kalamazoo, Michigan, United States .0 9908.0 Red Harley-Davidson NaN Softail ... NaN FALSE 100 NaN 1522 Private Seller Clear True FALSE 0.038 Used No Reserve! 6700.0 Tinley Park, Illinois, United States .0 8950.0 Burgundy Harley-Davidson Vehicle does NOT have an existing warranty Softail ... NaN FALSE 100 NaN 126 Private Seller Clear True FALSE 0.039 Used NaN 18000.0 Batavia, Illinois, United States .0 5600.0 Black Harley-Davidson Vehicle has an existing warranty Touring ... NaN FALSE 100 NaN 63 Private Seller Clear True FALSE 0.040 Used NaN 7300.0 Rolling Meadows, Illinois, United States 1997.0 20000.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Sportster ... NaN TRUE 100 5< 111 Private Seller Clear False TRUE NaN41 Used NaN 6800.0 Hampshire, Illinois, United States .0 55782.0 NaN Harley-Davidson Vehicle does NOT have an existing warranty Softail ... NaN TRUE 100 2< 298 Private Seller Clear False TRUE NaN42 Used Dent and scratch free. Paint and chrome in exc... 5000.0 South Bend, Indiana, United States .0 1350.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Sportster ... NaN FALSE 100 14 37 Private Seller Clear False TRUE NaN43 Used Excellent condition gently used. Adult driven 13200.0 Algonquin, Illinois, United States .0 15400.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 NaN 478 Private Seller Clear True FALSE 0.044 Used Excellent condition 11400.0 Indianapolis, Indiana, United States .0 1533.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 4< 79 Dealer Clear False TRUE NaN45 Used NaN 3250.0 Valparaiso, Indiana, United States .0 22896.0 Blue/Green Metallic Harley-Davidson Vehicle does NOT have an existing warranty Sportster ... NaN FALSE 100 9< 109 Private Seller Clear True TRUE 11.046 Used This is a nice looking Road King. Paint and ch... 8000.0 Madison, Wisconsin, United States .0 24742.0 Vivid Black Harley-Davidson Vehicle does NOT have an existing warranty. AS... Touring ... NaN FALSE 100 NaN 10701 Dealer Clear True FALSE 0.047 Used NaN 17800.0 Webberville, Michigan, United States .0 1500.0 Black Harley-Davidson Vehicle has an existing warranty Touring ... NaN TRUE 100 4< 33 Private Seller Clear False TRUE NaN48 Used NaN 8500.0 Rockford, Illinois, United States .0 51000.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN TRUE 100 8< 124 Private Seller Clear False TRUE NaN49 Used NaN 4050.0 Gilberts, Illinois, United States .0 6650.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Softail ... NaN FALSE NaN 7< 58 Private Seller Clear True TRUE 3.0... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...7443 Used NaN 7900.0 Raymond, New Hampshire, United States .0 0.0 Black Harley-Davidson NaN FXDBI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7444 Used NaN 5900.0 Raymond, New Hampshire, United States .0 7337.0 Gray Yamaha NaN YZF-R6 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7445 Used NaN 3900.0 Raymond, New Hampshire, United States .0 2669.0 Red Harley-Davidson NaN XG750 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7446 Used NaN 7900.0 Raymond, New Hampshire, United States .0 23440.0 Gray Kawasaki NaN Z1000 G ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7447 Used NaN 23499.0 Suncook, New Hampshire, United States .0 16927.0 Black Harley-Davidson NaN FLHTK ELECTRA GLIDE ULTRA LIMITED ... NaN TRUE 100 NaN 1978 Dealer Clear False FALSE NaN7448 Used Please feel free to contact me if you have any... 6500.0 Raymond, New Hampshire, United States .0 29541.0 Burgundy Harley-Davidson NaN Touring ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7449 Used NaN 6500.0 Raymond, New Hampshire, United States .0 11388.0 Black Harley-Davidson NaN FXDF ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7450 Used NaN 3900.0 Raymond, New Hampshire, United States .0 28117.0 Black Kawasaki NaN ZX-10R ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7451 Used NaN 5200.0 Raymond, New Hampshire, United States .0 12876.0 maroon Suzuki NaN GSX1300R ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7452 Used NaN 3900.0 Raymond, New Hampshire, United States .0 66219.0 Blue Harley-Davidson NaN FXD ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7453 Used Please feel free to contact me if you have any... 8300.0 Raymond, New Hampshire, United States .0 5468.0 TWO TONE Harley-Davidson NaN Softail ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7454 Used NaN 7400.0 Raymond, New Hampshire, United States .0 12333.0 Red Harley-Davidson NaN FLD103 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7455 Used NaN 4700.0 Raymond, New Hampshire, United States .0 424.0 Black Suzuki NaN GSX-S750 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7456 Used NaN 4900.0 Raymond, New Hampshire, United States .0 7552.0 Orange Yamaha NaN YZF-R6 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7457 Used NaN 8500.0 Raymond, New Hampshire, United States .0 0.0 Black Harley-Davidson NaN FXCW ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7458 Used NaN 9200.0 Raymond, New Hampshire, United States .0 0.0 Blue Harley-Davidson NaN FLTRX ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7459 Used NaN 3900.0 Raymond, New Hampshire, United States .0 19268.0 Black Harley-Davidson NaN FXD ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7460 Used NaN 7500.0 Raymond, New Hampshire, United States .0 703.0 Black Suzuki NaN GSX-R1000 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7461 Used NaN 4200.0 Raymond, New Hampshire, United States .0 5883.0 Gray Yamaha NaN XV1700 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7462 Used NaN 6500.0 Raymond, New Hampshire, United States .0 32267.0 Blue Harley-Davidson NaN FLSTFI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7463 Used NaN 7800.0 Raymond, New Hampshire, United States .0 45135.0 Orange Harley-Davidson NaN FLHTCUI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7464 Used NaN 4400.0 Raymond, New Hampshire, United States .0 2059.0 Black Suzuki NaN GSX-S750 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7465 Used NaN 7900.0 Raymond, New Hampshire, United States .0 11679.0 Black Harley-Davidson NaN FXDCI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7466 Used NaN 6500.0 Raymond, New Hampshire, United States .0 1389.0 Blue Suzuki NaN GSX-R600 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7467 Used Salvage Rebuildable Repairable No Reserve NR 7400.0 Raymond, New Hampshire, United States .0 41618.0 Blue Harley-Davidson NaN Touring ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7468 Used NaN 8800.0 Raymond, New Hampshire, United States .0 52418.0 White Harley-Davidson NaN FLHXI ... NaN TRUE 4.7 NaN 12409 Dealer Rebuilt, Rebuildable & Reconstructed False FALSE NaN7469 Used NaN 13570.0 Scott City, Missouri, United States .0 .0 Black Harley-Davidson Vehicle has an existing warranty Dyna Fat Bob ... NaN FALSE 100 NaN 4 Dealer Clear False FALSE NaN7470 Used NaN 7900.0 Raymond, New Hampshire, United States .0 64724.0 White Harley-Davidson NaN FLHTCUI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7471 Used NaN 6200.0 Raymond, New Hampshire, United States .0 55993.0 Red Harley-Davidson NaN FLHTCI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7472 Used NaN 7500.0 Raymond, New Hampshire, United States .0 32560.0 TWO TONE Harley-Davidson NaN FLSTNI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7473 Used NaN 5500.0 Raymond, New Hampshire, United States 2000.0 87123.0 White Harley-Davidson NaN FLSTC ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7474 Used NaN 3400.0 Raymond, New Hampshire, United States .0 23865.0 Blue Harley-Davidson NaN XL 883C ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7475 Used NaN 3900.0 Raymond, New Hampshire, United States .0 56633.0 Blue Harley-Davidson NaN FXD ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7476 Used NaN 8500.0 Raymond, New Hampshire, United States .0 36780.0 Blue Harley-Davidson NaN FLHTCUI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7477 Used NaN 4900.0 Raymond, New Hampshire, United States 2002.0 22709.0 Black Harley-Davidson NaN FXDL ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7478 Used NaN 9900.0 Raymond, New Hampshire, United States .0 20851.0 Brown Harley-Davidson NaN FLTRU ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7479 Used NaN 2900.0 Raymond, New Hampshire, United States .0 2905.0 Black Suzuki NaN SV ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7480 Used NaN 6500.0 Raymond, New Hampshire, United States .0 1701.0 Green Harley-Davidson NaN XL 883N ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7481 Used NaN 10500.0 Raymond, New Hampshire, United States .0 16231.0 Black Harley-Davidson NaN FLTRX ... NaN TRUE 4.7 NaN 12409 Dealer Rebuilt, Rebuildable & Reconstructed False FALSE NaN7482 Used NaN 7200.0 Raymond, New Hampshire, United States .0 29201.0 Black Harley-Davidson NaN FLTRI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7483 Used NaN 7500.0 Raymond, New Hampshire, United States .0 28716.0 Purple Harley-Davidson NaN FLHRCI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7484 Used NaN 5000.0 Raymond, New Hampshire, United States .0 12583.0 NaN Harley-Davidson NaN FXDI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7485 Used NaN 5000.0 Raymond, New Hampshire, United States .0 19931.0 Black Harley-Davidson NaN FXDI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7486 Used NaN 8900.0 Raymond, New Hampshire, United States .0 9305.0 Black Harley-Davidson NaN FXDWG ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7487 Used Please feel free to contact me if you have any... 4900.0 Raymond, New Hampshire, United States .0 3475.0 Gray Suzuki NaN Boulevard ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7488 Used NaN 3900.0 Raymond, New Hampshire, United States .0 23681.0 Black Harley-Davidson NaN FXDI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7489 Used NaN 8900.0 Raymond, New Hampshire, United States .0 5821.0 Black Suzuki NaN GSX1300RA ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7490 Used NaN 7800.0 Raymond, New Hampshire, United States .0 48616.0 Red BMW NaN R1200GS ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7491 Used NaN 7900.0 Raymond, New Hampshire, United States .0 6185.0 TWO TONE Yamaha NaN YZF-R1 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7492 Used NaN 12970.0 Scott City, Missouri, United States .0 448.0 Gray Harley-Davidson Vehicle has an existing warranty Dyna Street Bob ... NaN FALSE 100 NaN 4 Dealer Clear False FALSE NaN6272 rows × 22 columnsdf.shape(6272, 22)df.columnsIndex(['Condition', 'Condition_Desc', 'Price', 'Location', 'Model_Year','Mileage', 'Exterior_Color', 'Make', 'Warranty', 'Model', 'Sub_Model','Type', 'Vehicle_Title', 'OBO', 'Feedback_Perc', 'Watch_Count','N_Reviews', 'Seller_Status', 'Vehicle_Tile', 'Auction', 'Buy_Now','Bid_Count'],dtype='object')df.drop_duplicates(subset = ['Condition', 'Condition_Desc', 'Price', 'Location'], inplace = True)#指定列相同就认为是重复数据df.shape(5356, 22)
7.2 缺失值处理
缺失值首先需要根据实际情况定义可以采取直接删除法有时候需要使用替换法或者插值法常用的替换法有均值替换、前向替换、后向替换和常数替换df.apply(lambda x: sum(x.isnull()) / len(x), axis = 0)#每一列缺失值的比例Condition 0.000000Condition_Desc 0.752801Price 0.000000Location0.000373Model_Year 0.000747Mileage 0.004668Exterior_Color 0.102875Make 0.000747Warranty0.306385Model 0.014563Sub_Model 0.657394Type 0.206497Vehicle_Title0.971994OBO0.008215Feedback_Perc0.117065Watch_Count 0.500373N_Reviews 0.000934Seller_Status0.091860Vehicle_Tile0.009522Auction 0.002054Buy_Now 0.024645Bid_Count 0.690814dtype: float64df.dropna()#这一行只要有一个缺失值,就删除这一行。因为这个数据每一行都有缺失值,所以删除以后就都没有了#df.dropna(how = 'any')这一行只要有一个缺失值,就删除这一行。axis = 0轴向选择,默认是0,删除行;等于1时,删除列。#df.dropna(how = 'all')这一行所有数据缺失,就删除这一行。Condition Condition_Desc Price Location Model_Year Mileage Exterior_Color Make Warranty Model ... Vehicle_Title OBO Feedback_Perc Watch_Count N_Reviews Seller_Status Vehicle_Tile Auction Buy_Now Bid_Count0 rows × 22 columnsdf.dropna(how = 'any', subset = ['Condition', 'Price', 'Mileage'])#三个属性里面只要有一个是缺失值,就删除整行Condition Condition_Desc Price Location Model_Year Mileage Exterior_Color Make Warranty Model ... Vehicle_Title OBO Feedback_Perc Watch_Count N_Reviews Seller_Status Vehicle_Tile Auction Buy_Now Bid_Count0 Used mint!!! very low miles 11412.0 McHenry, Illinois, United States .0 16000.0 Black Harley-Davidson Unspecified Touring ... NaN FALSE 8.1 NaN 2427 Private Seller Clear True FALSE 28.01 Used Perfect condition 17200.0 Fort Recovery, Ohio, United States .0 60.0 Black Harley-Davidson Vehicle has an existing warranty Touring ... NaN FALSE 100 17 657 Private Seller Clear True TRUE 0.02 Used NaN 3872.0 Chicago, Illinois, United States 1970.0 25763.0 Silver/Blue BMW Vehicle does NOT have an existing warranty R-Series ... NaN FALSE 100 NaN 136 NaN Clear True FALSE 26.03 Used CLEAN TITLE READY TO RIDE HOME 6575.0 Green Bay, Wisconsin, United States .0 33142.0 Red Harley-Davidson NaN Touring ... NaN FALSE 100 NaN 2920 Dealer Clear True FALSE 11.04 Used NaN 10000.0 West Bend, Wisconsin, United States .0 17800.0 Blue Harley-Davidson NO WARRANTY Touring ... NaN FALSE 100 13 271 OWNER Clear True TRUE 0.05 Used It's a '72 in good shape 1500.0 Watervliet, Michigan, United States 1972.0 0.0 Red Harley-Davidson Vehicle does NOT have an existing warranty Sportster ... NaN FALSE 100 NaN 412 Private Seller Clear True FALSE 1.06 Used NaN 24900.0 Sterling, Illinois, United States .0 5548.0 Grey / Red / Silver Metallic Harley-Davidson NaN Touring ... NaN FALSE 9.8 NaN 6229 Dealer Clear True FALSE 1.07 Used NaN 1400.0 Williamston, Michigan, United States 1975.0 17868.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Sportster ... NaN FALSE 9.7 NaN 1159 Private Seller Clear True FALSE 6.08 Used NaN 5100.0 Palatine, Illinois, United States .0 2800.0 Cherry Red Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE NaN 16 3 Private Seller Clear True TRUE 6.09 Used NaN 8000.0 Chicago, Illinois, United States .0 3000.0 Black Harley-Davidson Vehicle has an existing warranty Sportster ... NaN FALSE NaN NaN 1 Private Seller Clear True FALSE 0.010 Used NaN 2125.0 Williamston, Michigan, United States 1978.0 30.0 Burgundy Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 9.7 NaN 1159 Private Seller Clear True FALSE 4.011 Used NaN 11100.0 Oak Park, Illinois, United States .0 5800.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 NaN 83 Private Seller Clear True FALSE 21.012 Used NaN 1125.0 Pewaukee, Wisconsin, United States 2002.0 55000.0 RICH RED W/STRIPES Harley-Davidson Vehicle does NOT have an existing warranty Other ... NaN FALSE 100 NaN 128 Private Seller Clear True FALSE 5.013 Used Overall, this bike is in good condition for it... 3550.0 Madison, Wisconsin, United States 2000.0 57898.0 Luxury Rich Red Harley-Davidson Vehicle does NOT have an existing warranty. AS... Touring ... NaN FALSE 100 NaN 10701 Dealer Clear True FALSE 2.014 Used NaN 5500.0 Davenport, Iowa, United States .0 22102.0 NaN Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 9.3 NaN 244 Private Seller Clear True FALSE 16.015 Used NaN 9000.0 Plymouth, Indiana, United States .0 7792.0 Red Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 NaN 299 Private Seller Clear True FALSE 3.016 Used NaN 8100.0 Goshen, Indiana, United States 1973.0 9305.0 White Harley-Davidson Vehicle does NOT have an existing warranty Other ... NaN FALSE 100 NaN 300 Private Seller Clear True FALSE 25.017 Used Absolutely perfect condition 14000.0 Plainfield, Indiana, United States .0 1125.0 Blue Harley-Davidson Vehicle has an existing warranty Softail ... NaN FALSE 100 NaN 170 Private Seller Clear True FALSE 0.018 Used NaN 20000.0 Bellevue, Iowa, United States .0 5500.0 Red Harley-Davidson Vehicle has an existing warranty Touring ... NaN TRUE 100 8< 66 Private Seller Clear False TRUE NaN19 New NaN 13000.0 Des Plaines, Illinois, United States .0 250.0 Black Harley-Davidson Unspecified Softail ... NaN FALSE 100 23 181 Private Seller Clear True TRUE 0.020 New NaN 10900.0 Ottawa, Illinois, United States .0 140.0 Black Harley-Davidson Vehicle has an existing warranty Touring ... NaN TRUE 100 NaN 3172 Private Seller Clear False TRUE NaN21 Used IN AWESOME CONDITION. SUPER RARE. JUST SERVIC... 9999.0 Orland Park, Illinois, United States .0 25405.0 Black Harley-Davidson NaN Softail ... NaN FALSE 100 NaN 283 Dealer Clear True FALSE 0.022 Used NaN 5700.0 Cross Plains, Wisconsin, United States 1982.0 28888.0 Black & Blue Harley-Davidson NaN Other ... NaN FALSE 100 NaN 947 Private Seller Clear True FALSE 0.023 Used NaN 7400.0 Watervliet, Michigan, United States 2001.0 23658.0 Purple Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 NaN 412 Private Seller Clear True FALSE 0.024 Used NaN 26500.0 Kewanee, Illinois, United States .0 13089.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN TRUE 100 15 6 Private Seller Clear False TRUE NaN25 Used NaN 9850.0 Chicago, Illinois, United States .0 23546.0 Blue Harley-Davidson NaN Touring ... NaN FALSE 100 NaN 12 Private Seller Clear True FALSE 0.026 Used NaN 45900.0 South Haven, Michigan, United States .0 40000.0 Red Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 25 199 Private Seller Clear False TRUE NaN27 Used Almost new Harley-Davidson FLHR Road Ki... 10600.0 Wheeling, Illinois, United States .0 3769.0 Red Hot Sun Glo Harley-Davidson NaN Touring ... NaN TRUE 100 22 175 Private Seller Clear False TRUE NaN28 Used * Harley Davidson Rocker C *Chrome Chrome ... 12000.0 Chicago, Illinois, United States .0 8700.0 Burgundy Harley-Davidson Vehicle does NOT have an existing warranty Softail ... NaN FALSE 100 NaN 11 Private Seller Clear True FALSE 0.029 Used NaN 20000.0 Chicago, Illinois, United States .0 16827.0 Black Harley-Davidson NaN TRIKE ... NaN TRUE NaN 31 17 Private Seller Clear False TRUE NaN30 Used Very clean and well maintained 25000.0 Summit-Argo, Illinois, United States .0 15000.0 Kandy brandywine Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 1< 18 Private Seller Clear True TRUE 0.031 Used NaN 20000.0 Coldwater, Michigan, United States .0 2900.0 Blue Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 NaN 142 Private Seller Clear True FALSE 0.032 Used NaN 11000.0 Elkhart, Indiana, United States .0 15200.0 Red Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN TRUE NaN 12 28 Private Seller Clear False TRUE NaN33 Used NaN 8500.0 Glenview NAS, Illinois, United States .0 10319.0 Black Harley-Davidson NaN Touring ... NaN TRUE 100 8< 324 Private Seller Clear False TRUE NaN34 Used NaN 18000.0 Fox River Grove, Illinois, United States .0 29544.0 Blue Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN TRUE 100 NaN 111 Private Seller Clear False TRUE NaN35 Used NaN 7700.0 Roselle, Illinois, United States .0 10893.0 NaN Harley-Davidson NaN Other ... NaN FALSE 100 NaN 236 NaN Clear False TRUE NaN36 Used NaN 2750.0 Belvidere, Illinois, United States .0 35735.0 Black Harley-Davidson Vehicle does NOT have an existing warranty FLH ... NaN FALSE 100 NaN 100 Belvidere Police Department Clear True FALSE 19.037 Used Year ManufacturerHarley-Davidson ModelScre... 10895.0 Kalamazoo, Michigan, United States .0 9908.0 Red Harley-Davidson NaN Softail ... NaN FALSE 100 NaN 1522 Private Seller Clear True FALSE 0.038 Used No Reserve! 6700.0 Tinley Park, Illinois, United States .0 8950.0 Burgundy Harley-Davidson Vehicle does NOT have an existing warranty Softail ... NaN FALSE 100 NaN 126 Private Seller Clear True FALSE 0.039 Used NaN 18000.0 Batavia, Illinois, United States .0 5600.0 Black Harley-Davidson Vehicle has an existing warranty Touring ... NaN FALSE 100 NaN 63 Private Seller Clear True FALSE 0.040 Used NaN 7300.0 Rolling Meadows, Illinois, United States 1997.0 20000.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Sportster ... NaN TRUE 100 5< 111 Private Seller Clear False TRUE NaN41 Used NaN 6800.0 Hampshire, Illinois, United States .0 55782.0 NaN Harley-Davidson Vehicle does NOT have an existing warranty Softail ... NaN TRUE 100 2< 298 Private Seller Clear False TRUE NaN42 Used Dent and scratch free. Paint and chrome in exc... 5000.0 South Bend, Indiana, United States .0 1350.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Sportster ... NaN FALSE 100 14 37 Private Seller Clear False TRUE NaN43 Used Excellent condition gently used. Adult driven 13200.0 Algonquin, Illinois, United States .0 15400.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 NaN 478 Private Seller Clear True FALSE 0.044 Used Excellent condition 11400.0 Indianapolis, Indiana, United States .0 1533.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 4< 79 Dealer Clear False TRUE NaN45 Used NaN 3250.0 Valparaiso, Indiana, United States .0 22896.0 Blue/Green Metallic Harley-Davidson Vehicle does NOT have an existing warranty Sportster ... NaN FALSE 100 9< 109 Private Seller Clear True TRUE 11.046 Used This is a nice looking Road King. Paint and ch... 8000.0 Madison, Wisconsin, United States .0 24742.0 Vivid Black Harley-Davidson Vehicle does NOT have an existing warranty. AS... Touring ... NaN FALSE 100 NaN 10701 Dealer Clear True FALSE 0.047 Used NaN 17800.0 Webberville, Michigan, United States .0 1500.0 Black Harley-Davidson Vehicle has an existing warranty Touring ... NaN TRUE 100 4< 33 Private Seller Clear False TRUE NaN48 Used NaN 8500.0 Rockford, Illinois, United States .0 51000.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN TRUE 100 8< 124 Private Seller Clear False TRUE NaN49 Used NaN 4050.0 Gilberts, Illinois, United States .0 6650.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Softail ... NaN FALSE NaN 7< 58 Private Seller Clear True TRUE 3.0... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...7390 Used NaN 14999.0 Greensboro, North Carolina, United States .0 14000.0 Red Indian Unspecified Chief?Vintage ... NaN TRUE 100 NaN 312 Dealer Clear False FALSE NaN7391 Used NaN 9299.0 Naples, Florida, United States .0 4470.0 Blue BMW NaN F-Series ... NaN TRUE 8.6 NaN 1122 Dealer Clear False FALSE NaN7392 Used NaN 12990.0 Scott City, Missouri, United States .0 1617.0 Black Harley-Davidson Vehicle has an existing warranty Flstfb ... NaN FALSE 100 NaN 4 Dealer Clear False FALSE NaN7393 Used NaN 15990.0 Scott City, Missouri, United States .0 1873.0 Black Harley-Davidson Vehicle has an existing warranty Heritage Softail Classic ... NaN FALSE 100 NaN 4 Dealer Clear False FALSE NaN7394 New NaN 14440.0 Plano, Texas, United States .0 7.0 White BMW Unspecified R-Series ... NaN FALSE 100 NaN 161 Dealer Clear False FALSE NaN7395 Used NaN 10599.0 Delbarton, West Virginia, United States .0 16850.0 Red Harley-Davidson Unspecified FLHRCI - Road King?Classic ... NaN TRUE 100 NaN 28 Dealer Clear False FALSE NaN7398 Used NaN 5200.0 Raymond, New Hampshire, United States .0 5307.0 Black Suzuki NaN GSX-R750 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7399 Used Please feel free to contact me if you have any... 4900.0 Raymond, New Hampshire, United States .0 22931.0 Gray Suzuki NaN GSX-R ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7404 Used NaN 7500.0 Raymond, New Hampshire, United States .0 15906.0 Blue Harley-Davidson NaN FLHTCI ... NaN TRUE 4.7 NaN 12409 Dealer Rebuilt, Rebuildable & Reconstructed False FALSE NaN7405 Used NaN 4300.0 Raymond, New Hampshire, United States .0 7071.0 Black Suzuki NaN GSX-R600 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7406 Used NaN 6600.0 Raymond, New Hampshire, United States .0 68715.0 Black Harley-Davidson NaN FLHRCI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7409 Used NaN 11700.0 Raymond, New Hampshire, United States .0 20788.0 Green Harley-Davidson NaN FLHX ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7410 Used Please feel free to contact me if you have any... 5200.0 Raymond, New Hampshire, United States .0 3123.0 DARK BLUE Harley-Davidson NaN Sportster ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7411 Used NaN 4900.0 Raymond, New Hampshire, United States .0 3174.0 Black Suzuki NaN GSX-S 750 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7413 Used NaN 6500.0 Raymond, New Hampshire, United States .0 70833.0 Blue Harley-Davidson NaN FLHTCUI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7414 Used NaN 10500.0 Raymond, New Hampshire, United States .0 32549.0 Brown Harley-Davidson NaN FLHTK ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7417 Used Please feel free to contact me if you have any... 5900.0 Raymond, New Hampshire, United States .0 14627.0 Red Honda NaN CBR ... NaN TRUE 4.7 NaN 12409 Dealer Rebuilt, Rebuildable & Reconstructed False FALSE NaN7418 Used NaN 9600.0 Raymond, New Hampshire, United States .0 35906.0 Blue Harley-Davidson NaN FLHRCI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7419 Used NaN 12900.0 Raymond, New Hampshire, United States .0 16033.0 Black Harley-Davidson NaN FLHX ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7420 Used NaN 5900.0 Raymond, New Hampshire, United States .0 122277.0 MAROON Harley-Davidson NaN FLHRSI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7422 Used NaN 1900.0 Raymond, New Hampshire, United States .0 6495.0 Black Hyosung NaN GT650 R ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7423 Used NaN 3300.0 Raymond, New Hampshire, United States .0 21756.0 CHARCOAL Suzuki NaN DL650 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7424 Used NaN 3200.0 Raymond, New Hampshire, United States .0 4959.0 Black Harley-Davidson NaN XL 883L ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7427 Used NaN 12500.0 Raymond, New Hampshire, United States .0 27877.0 Gray Harley-Davidson NaN FLHX ... NaN TRUE 4.7 NaN 12409 Dealer Rebuilt, Rebuildable & Reconstructed False FALSE NaN7428 Used NaN 7700.0 Raymond, New Hampshire, United States .0 5680.0 Green Kawasaki NaN ZX-6R ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7429 Used NaN 5800.0 Raymond, New Hampshire, United States .0 4916.0 Orange Harley-Davidson NaN XL 1200V ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7430 Used NaN 6800.0 Raymond, New Hampshire, United States .0 0.0 Black Harley-Davidson NaN FLHTCUI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7431 Used NaN 6200.0 Raymond, New Hampshire, United States .0 24245.0 Blue Harley-Davidson NaN FLSTCI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7432 Used NaN 6300.0 Raymond, New Hampshire, United States .0 15272.0 Red Harley-Davidson NaN FXSTDI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7434 Used NaN 10600.0 Raymond, New Hampshire, United States .0 48129.0 Blue Harley-Davidson NaN FLHX ... NaN TRUE 4.7 NaN 12409 Dealer Rebuilt, Rebuildable & Reconstructed False FALSE NaN7436 Used NaN 13900.0 Raymond, New Hampshire, United States .0 28510.0 Black Harley-Davidson NaN FLHTKL ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7438 Used NaN 4200.0 Raymond, New Hampshire, United States .0 10326.0 TWO TONE Yamaha NaN XV1700 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7441 Used NaN 9500.0 Raymond, New Hampshire, United States .0 21183.0 TWO TONE Harley-Davidson NaN FLSTNI ... NaN TRUE 4.7 NaN 12409 Dealer Rebuilt, Rebuildable & Reconstructed False FALSE NaN7442 Used NaN 4800.0 Raymond, New Hampshire, United States .0 17410.0 White Suzuki NaN GSX1300R ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7448 Used Please feel free to contact me if you have any... 6500.0 Raymond, New Hampshire, United States .0 29541.0 Burgundy Harley-Davidson NaN Touring ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7453 Used Please feel free to contact me if you have any... 8300.0 Raymond, New Hampshire, United States .0 5468.0 TWO TONE Harley-Davidson NaN Softail ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7454 Used NaN 7400.0 Raymond, New Hampshire, United States .0 12333.0 Red Harley-Davidson NaN FLD103 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7457 Used NaN 8500.0 Raymond, New Hampshire, United States .0 0.0 Black Harley-Davidson NaN FXCW ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7458 Used NaN 9200.0 Raymond, New Hampshire, United States .0 0.0 Blue Harley-Davidson NaN FLTRX ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7463 Used NaN 7800.0 Raymond, New Hampshire, United States .0 45135.0 Orange Harley-Davidson NaN FLHTCUI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7464 Used NaN 4400.0 Raymond, New Hampshire, United States .0 2059.0 Black Suzuki NaN GSX-S750 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7467 Used Salvage Rebuildable Repairable No Reserve NR 7400.0 Raymond, New Hampshire, United States .0 41618.0 Blue Harley-Davidson NaN Touring ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7468 Used NaN 8800.0 Raymond, New Hampshire, United States .0 52418.0 White Harley-Davidson NaN FLHXI ... NaN TRUE 4.7 NaN 12409 Dealer Rebuilt, Rebuildable & Reconstructed False FALSE NaN7469 Used NaN 13570.0 Scott City, Missouri, United States .0 .0 Black Harley-Davidson Vehicle has an existing warranty Dyna Fat Bob ... NaN FALSE 100 NaN 4 Dealer Clear False FALSE NaN7474 Used NaN 3400.0 Raymond, New Hampshire, United States .0 23865.0 Blue Harley-Davidson NaN XL 883C ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7478 Used NaN 9900.0 Raymond, New Hampshire, United States .0 20851.0 Brown Harley-Davidson NaN FLTRU ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7479 Used NaN 2900.0 Raymond, New Hampshire, United States .0 2905.0 Black Suzuki NaN SV ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7482 Used NaN 7200.0 Raymond, New Hampshire, United States .0 29201.0 Black Harley-Davidson NaN FLTRI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7484 Used NaN 5000.0 Raymond, New Hampshire, United States .0 12583.0 NaN Harley-Davidson NaN FXDI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7486 Used NaN 8900.0 Raymond, New Hampshire, United States .0 9305.0 Black Harley-Davidson NaN FXDWG ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN5331 rows × 22 columnsdf.fillna(0)#所有缺失值用0填补Condition Condition_Desc Price Location Model_Year Mileage Exterior_Color Make Warranty Model ... Vehicle_Title OBO Feedback_Perc Watch_Count N_Reviews Seller_Status Vehicle_Tile Auction Buy_Now Bid_Count0 Used mint!!! very low miles 11412.0 McHenry, Illinois, United States .0 16000.0 Black Harley-Davidson Unspecified Touring ... 0 FALSE 8.1 0 2427 Private Seller Clear True FALSE 28.01 Used Perfect condition 17200.0 Fort Recovery, Ohio, United States .0 60.0 Black Harley-Davidson Vehicle has an existing warranty Touring ... 0 FALSE 100 17 657 Private Seller Clear True TRUE 0.02 Used 0 3872.0 Chicago, Illinois, United States 1970.0 25763.0 Silver/Blue BMW Vehicle does NOT have an existing warranty R-Series ... 0 FALSE 100 0 136 0 Clear True FALSE 26.03 Used CLEAN TITLE READY TO RIDE HOME 6575.0 Green Bay, Wisconsin, United States .0 33142.0 Red Harley-Davidson 0 Touring ... 0 FALSE 100 0 2920 Dealer Clear True FALSE 11.04 Used 0 10000.0 West Bend, Wisconsin, United States .0 17800.0 Blue Harley-Davidson NO WARRANTY Touring ... 0 FALSE 100 13 271 OWNER Clear True TRUE 0.05 Used It's a '72 in good shape 1500.0 Watervliet, Michigan, United States 1972.0 0.0 Red Harley-Davidson Vehicle does NOT have an existing warranty Sportster ... 0 FALSE 100 0 412 Private Seller Clear True FALSE 1.06 Used 0 24900.0 Sterling, Illinois, United States .0 5548.0 Grey / Red / Silver Metallic Harley-Davidson 0 Touring ... 0 FALSE 9.8 0 6229 Dealer Clear True FALSE 1.07 Used 0 1400.0 Williamston, Michigan, United States 1975.0 17868.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Sportster ... 0 FALSE 9.7 0 1159 Private Seller Clear True FALSE 6.08 Used 0 5100.0 Palatine, Illinois, United States .0 2800.0 Cherry Red Harley-Davidson Vehicle does NOT have an existing warranty Touring ... 0 FALSE 0 16 3 Private Seller Clear True TRUE 6.09 Used 0 8000.0 Chicago, Illinois, United States .0 3000.0 Black Harley-Davidson Vehicle has an existing warranty Sportster ... 0 FALSE 0 0 1 Private Seller Clear True FALSE 0.010 Used 0 2125.0 Williamston, Michigan, United States 1978.0 30.0 Burgundy Harley-Davidson Vehicle does NOT have an existing warranty Touring ... 0 FALSE 9.7 0 1159 Private Seller Clear True FALSE 4.011 Used 0 11100.0 Oak Park, Illinois, United States .0 5800.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Touring ... 0 FALSE 100 0 83 Private Seller Clear True FALSE 21.012 Used 0 1125.0 Pewaukee, Wisconsin, United States 2002.0 55000.0 RICH RED W/STRIPES Harley-Davidson Vehicle does NOT have an existing warranty Other ... 0 FALSE 100 0 128 Private Seller Clear True FALSE 5.013 Used Overall, this bike is in good condition for it... 3550.0 Madison, Wisconsin, United States 2000.0 57898.0 Luxury Rich Red Harley-Davidson Vehicle does NOT have an existing warranty. AS... Touring ... 0 FALSE 100 0 10701 Dealer Clear True FALSE 2.014 Used 0 5500.0 Davenport, Iowa, United States .0 22102.0 0 Harley-Davidson Vehicle does NOT have an existing warranty Touring ... 0 FALSE 9.3 0 244 Private Seller Clear True FALSE 16.015 Used 0 9000.0 Plymouth, Indiana, United States .0 7792.0 Red Harley-Davidson Vehicle does NOT have an existing warranty Touring ... 0 FALSE 100 0 299 Private Seller Clear True FALSE 3.016 Used 0 8100.0 Goshen, Indiana, United States 1973.0 9305.0 White Harley-Davidson Vehicle does NOT have an existing warranty Other ... 0 FALSE 100 0 300 Private Seller Clear True FALSE 25.017 Used Absolutely perfect condition 14000.0 Plainfield, Indiana, United States .0 1125.0 Blue Harley-Davidson Vehicle has an existing warranty Softail ... 0 FALSE 100 0 170 Private Seller Clear True FALSE 0.018 Used 0 20000.0 Bellevue, Iowa, United States .0 5500.0 Red Harley-Davidson Vehicle has an existing warranty Touring ... 0 TRUE 100 8< 66 Private Seller Clear False TRUE 0.019 New 0 13000.0 Des Plaines, Illinois, United States .0 250.0 Black Harley-Davidson Unspecified Softail ... 0 FALSE 100 23 181 Private Seller Clear True TRUE 0.020 New 0 10900.0 Ottawa, Illinois, United States .0 140.0 Black Harley-Davidson Vehicle has an existing warranty Touring ... 0 TRUE 100 0 3172 Private Seller Clear False TRUE 0.021 Used IN AWESOME CONDITION. SUPER RARE. JUST SERVIC... 9999.0 Orland Park, Illinois, United States .0 25405.0 Black Harley-Davidson 0 Softail ... 0 FALSE 100 0 283 Dealer Clear True FALSE 0.022 Used 0 5700.0 Cross Plains, Wisconsin, United States 1982.0 28888.0 Black & Blue Harley-Davidson 0 Other ... 0 FALSE 100 0 947 Private Seller Clear True FALSE 0.023 Used 0 7400.0 Watervliet, Michigan, United States 2001.0 23658.0 Purple Harley-Davidson Vehicle does NOT have an existing warranty Touring ... 0 FALSE 100 0 412 Private Seller Clear True FALSE 0.024 Used 0 26500.0 Kewanee, Illinois, United States .0 13089.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Touring ... 0 TRUE 100 15 6 Private Seller Clear False TRUE 0.025 Used 0 9850.0 Chicago, Illinois, United States .0 23546.0 Blue Harley-Davidson 0 Touring ... 0 FALSE 100 0 12 Private Seller Clear True FALSE 0.026 Used 0 45900.0 South Haven, Michigan, United States .0 40000.0 Red Harley-Davidson Vehicle does NOT have an existing warranty Touring ... 0 FALSE 100 25 199 Private Seller Clear False TRUE 0.027 Used Almost new Harley-Davidson FLHR Road Ki... 10600.0 Wheeling, Illinois, United States .0 3769.0 Red Hot Sun Glo Harley-Davidson 0 Touring ... 0 TRUE 100 22 175 Private Seller Clear False TRUE 0.028 Used * Harley Davidson Rocker C *Chrome Chrome ... 12000.0 Chicago, Illinois, United States .0 8700.0 Burgundy Harley-Davidson Vehicle does NOT have an existing warranty Softail ... 0 FALSE 100 0 11 Private Seller Clear True FALSE 0.029 Used 0 20000.0 Chicago, Illinois, United States .0 16827.0 Black Harley-Davidson 0 TRIKE ... 0 TRUE 0 31 17 Private Seller Clear False TRUE 0.030 Used Very clean and well maintained 25000.0 Summit-Argo, Illinois, United States .0 15000.0 Kandy brandywine Harley-Davidson Vehicle does NOT have an existing warranty Touring ... 0 FALSE 100 1< 18 Private Seller Clear True TRUE 0.031 Used 0 20000.0 Coldwater, Michigan, United States .0 2900.0 Blue Harley-Davidson Vehicle does NOT have an existing warranty Touring ... 0 FALSE 100 0 142 Private Seller Clear True FALSE 0.032 Used 0 11000.0 Elkhart, Indiana, United States .0 15200.0 Red Harley-Davidson Vehicle does NOT have an existing warranty Touring ... 0 TRUE 0 12 28 Private Seller Clear False TRUE 0.033 Used 0 8500.0 Glenview NAS, Illinois, United States .0 10319.0 Black Harley-Davidson 0 Touring ... 0 TRUE 100 8< 324 Private Seller Clear False TRUE 0.034 Used 0 18000.0 Fox River Grove, Illinois, United States .0 29544.0 Blue Harley-Davidson Vehicle does NOT have an existing warranty Touring ... 0 TRUE 100 0 111 Private Seller Clear False TRUE 0.035 Used 0 7700.0 Roselle, Illinois, United States .0 10893.0 0 Harley-Davidson 0 Other ... 0 FALSE 100 0 236 0 Clear False TRUE 0.036 Used 0 2750.0 Belvidere, Illinois, United States .0 35735.0 Black Harley-Davidson Vehicle does NOT have an existing warranty FLH ... 0 FALSE 100 0 100 Belvidere Police Department Clear True FALSE 19.037 Used Year ManufacturerHarley-Davidson ModelScre... 10895.0 Kalamazoo, Michigan, United States .0 9908.0 Red Harley-Davidson 0 Softail ... 0 FALSE 100 0 1522 Private Seller Clear True FALSE 0.038 Used No Reserve! 6700.0 Tinley Park, Illinois, United States .0 8950.0 Burgundy Harley-Davidson Vehicle does NOT have an existing warranty Softail ... 0 FALSE 100 0 126 Private Seller Clear True FALSE 0.039 Used 0 18000.0 Batavia, Illinois, United States .0 5600.0 Black Harley-Davidson Vehicle has an existing warranty Touring ... 0 FALSE 100 0 63 Private Seller Clear True FALSE 0.040 Used 0 7300.0 Rolling Meadows, Illinois, United States 1997.0 20000.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Sportster ... 0 TRUE 100 5< 111 Private Seller Clear False TRUE 0.041 Used 0 6800.0 Hampshire, Illinois, United States .0 55782.0 0 Harley-Davidson Vehicle does NOT have an existing warranty Softail ... 0 TRUE 100 2< 298 Private Seller Clear False TRUE 0.042 Used Dent and scratch free. Paint and chrome in exc... 5000.0 South Bend, Indiana, United States .0 1350.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Sportster ... 0 FALSE 100 14 37 Private Seller Clear False TRUE 0.043 Used Excellent condition gently used. Adult driven 13200.0 Algonquin, Illinois, United States .0 15400.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Touring ... 0 FALSE 100 0 478 Private Seller Clear True FALSE 0.044 Used Excellent condition 11400.0 Indianapolis, Indiana, United States .0 1533.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Touring ... 0 FALSE 100 4< 79 Dealer Clear False TRUE 0.045 Used 0 3250.0 Valparaiso, Indiana, United States .0 22896.0 Blue/Green Metallic Harley-Davidson Vehicle does NOT have an existing warranty Sportster ... 0 FALSE 100 9< 109 Private Seller Clear True TRUE 11.046 Used This is a nice looking Road King. Paint and ch... 8000.0 Madison, Wisconsin, United States .0 24742.0 Vivid Black Harley-Davidson Vehicle does NOT have an existing warranty. AS... Touring ... 0 FALSE 100 0 10701 Dealer Clear True FALSE 0.047 Used 0 17800.0 Webberville, Michigan, United States .0 1500.0 Black Harley-Davidson Vehicle has an existing warranty Touring ... 0 TRUE 100 4< 33 Private Seller Clear False TRUE 0.048 Used 0 8500.0 Rockford, Illinois, United States .0 51000.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Touring ... 0 TRUE 100 8< 124 Private Seller Clear False TRUE 0.049 Used 0 4050.0 Gilberts, Illinois, United States .0 6650.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Softail ... 0 FALSE 0 7< 58 Private Seller Clear True TRUE 3.0... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...7390 Used 0 14999.0 Greensboro, North Carolina, United States .0 14000.0 Red Indian Unspecified Chief?Vintage ... 0 TRUE 100 0 312 Dealer Clear False FALSE 0.07391 Used 0 9299.0 Naples, Florida, United States .0 4470.0 Blue BMW 0 F-Series ... 0 TRUE 8.6 0 1122 Dealer Clear False FALSE 0.07392 Used 0 12990.0 Scott City, Missouri, United States .0 1617.0 Black Harley-Davidson Vehicle has an existing warranty Flstfb ... 0 FALSE 100 0 4 Dealer Clear False FALSE 0.07393 Used 0 15990.0 Scott City, Missouri, United States .0 1873.0 Black Harley-Davidson Vehicle has an existing warranty Heritage Softail Classic ... 0 FALSE 100 0 4 Dealer Clear False FALSE 0.07394 New 0 14440.0 Plano, Texas, United States .0 7.0 White BMW Unspecified R-Series ... 0 FALSE 100 0 161 Dealer Clear False FALSE 0.07395 Used 0 10599.0 Delbarton, West Virginia, United States .0 16850.0 Red Harley-Davidson Unspecified FLHRCI - Road King?Classic ... 0 TRUE 100 0 28 Dealer Clear False FALSE 0.07398 Used 0 5200.0 Raymond, New Hampshire, United States .0 5307.0 Black Suzuki 0 GSX-R750 ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07399 Used Please feel free to contact me if you have any... 4900.0 Raymond, New Hampshire, United States .0 22931.0 Gray Suzuki 0 GSX-R ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07404 Used 0 7500.0 Raymond, New Hampshire, United States .0 15906.0 Blue Harley-Davidson 0 FLHTCI ... 0 TRUE 4.7 0 12409 Dealer Rebuilt, Rebuildable & Reconstructed False FALSE 0.07405 Used 0 4300.0 Raymond, New Hampshire, United States .0 7071.0 Black Suzuki 0 GSX-R600 ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07406 Used 0 6600.0 Raymond, New Hampshire, United States .0 68715.0 Black Harley-Davidson 0 FLHRCI ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07409 Used 0 11700.0 Raymond, New Hampshire, United States .0 20788.0 Green Harley-Davidson 0 FLHX ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07410 Used Please feel free to contact me if you have any... 5200.0 Raymond, New Hampshire, United States .0 3123.0 DARK BLUE Harley-Davidson 0 Sportster ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07411 Used 0 4900.0 Raymond, New Hampshire, United States .0 3174.0 Black Suzuki 0 GSX-S 750 ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07413 Used 0 6500.0 Raymond, New Hampshire, United States .0 70833.0 Blue Harley-Davidson 0 FLHTCUI ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07414 Used 0 10500.0 Raymond, New Hampshire, United States .0 32549.0 Brown Harley-Davidson 0 FLHTK ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07417 Used Please feel free to contact me if you have any... 5900.0 Raymond, New Hampshire, United States .0 14627.0 Red Honda 0 CBR ... 0 TRUE 4.7 0 12409 Dealer Rebuilt, Rebuildable & Reconstructed False FALSE 0.07418 Used 0 9600.0 Raymond, New Hampshire, United States .0 35906.0 Blue Harley-Davidson 0 FLHRCI ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07419 Used 0 12900.0 Raymond, New Hampshire, United States .0 16033.0 Black Harley-Davidson 0 FLHX ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07420 Used 0 5900.0 Raymond, New Hampshire, United States .0 122277.0 MAROON Harley-Davidson 0 FLHRSI ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07422 Used 0 1900.0 Raymond, New Hampshire, United States .0 6495.0 Black Hyosung 0 GT650 R ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07423 Used 0 3300.0 Raymond, New Hampshire, United States .0 21756.0 CHARCOAL Suzuki 0 DL650 ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07424 Used 0 3200.0 Raymond, New Hampshire, United States .0 4959.0 Black Harley-Davidson 0 XL 883L ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07427 Used 0 12500.0 Raymond, New Hampshire, United States .0 27877.0 Gray Harley-Davidson 0 FLHX ... 0 TRUE 4.7 0 12409 Dealer Rebuilt, Rebuildable & Reconstructed False FALSE 0.07428 Used 0 7700.0 Raymond, New Hampshire, United States .0 5680.0 Green Kawasaki 0 ZX-6R ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07429 Used 0 5800.0 Raymond, New Hampshire, United States .0 4916.0 Orange Harley-Davidson 0 XL 1200V ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07430 Used 0 6800.0 Raymond, New Hampshire, United States .0 0.0 Black Harley-Davidson 0 FLHTCUI ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07431 Used 0 6200.0 Raymond, New Hampshire, United States .0 24245.0 Blue Harley-Davidson 0 FLSTCI ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07432 Used 0 6300.0 Raymond, New Hampshire, United States .0 15272.0 Red Harley-Davidson 0 FXSTDI ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07434 Used 0 10600.0 Raymond, New Hampshire, United States .0 48129.0 Blue Harley-Davidson 0 FLHX ... 0 TRUE 4.7 0 12409 Dealer Rebuilt, Rebuildable & Reconstructed False FALSE 0.07436 Used 0 13900.0 Raymond, New Hampshire, United States .0 28510.0 Black Harley-Davidson 0 FLHTKL ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07438 Used 0 4200.0 Raymond, New Hampshire, United States .0 10326.0 TWO TONE Yamaha 0 XV1700 ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07441 Used 0 9500.0 Raymond, New Hampshire, United States .0 21183.0 TWO TONE Harley-Davidson 0 FLSTNI ... 0 TRUE 4.7 0 12409 Dealer Rebuilt, Rebuildable & Reconstructed False FALSE 0.07442 Used 0 4800.0 Raymond, New Hampshire, United States .0 17410.0 White Suzuki 0 GSX1300R ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07448 Used Please feel free to contact me if you have any... 6500.0 Raymond, New Hampshire, United States .0 29541.0 Burgundy Harley-Davidson 0 Touring ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07453 Used Please feel free to contact me if you have any... 8300.0 Raymond, New Hampshire, United States .0 5468.0 TWO TONE Harley-Davidson 0 Softail ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07454 Used 0 7400.0 Raymond, New Hampshire, United States .0 12333.0 Red Harley-Davidson 0 FLD103 ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07457 Used 0 8500.0 Raymond, New Hampshire, United States .0 0.0 Black Harley-Davidson 0 FXCW ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07458 Used 0 9200.0 Raymond, New Hampshire, United States .0 0.0 Blue Harley-Davidson 0 FLTRX ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07463 Used 0 7800.0 Raymond, New Hampshire, United States .0 45135.0 Orange Harley-Davidson 0 FLHTCUI ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07464 Used 0 4400.0 Raymond, New Hampshire, United States .0 2059.0 Black Suzuki 0 GSX-S750 ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07467 Used Salvage Rebuildable Repairable No Reserve NR 7400.0 Raymond, New Hampshire, United States .0 41618.0 Blue Harley-Davidson 0 Touring ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07468 Used 0 8800.0 Raymond, New Hampshire, United States .0 52418.0 White Harley-Davidson 0 FLHXI ... 0 TRUE 4.7 0 12409 Dealer Rebuilt, Rebuildable & Reconstructed False FALSE 0.07469 Used 0 13570.0 Scott City, Missouri, United States .0 .0 Black Harley-Davidson Vehicle has an existing warranty Dyna Fat Bob ... 0 FALSE 100 0 4 Dealer Clear False FALSE 0.07474 Used 0 3400.0 Raymond, New Hampshire, United States .0 23865.0 Blue Harley-Davidson 0 XL 883C ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07478 Used 0 9900.0 Raymond, New Hampshire, United States .0 20851.0 Brown Harley-Davidson 0 FLTRU ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07479 Used 0 2900.0 Raymond, New Hampshire, United States .0 2905.0 Black Suzuki 0 SV ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07482 Used 0 7200.0 Raymond, New Hampshire, United States .0 29201.0 Black Harley-Davidson 0 FLTRI ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07484 Used 0 5000.0 Raymond, New Hampshire, United States .0 12583.0 0 Harley-Davidson 0 FXDI ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.07486 Used 0 8900.0 Raymond, New Hampshire, United States .0 9305.0 Black Harley-Davidson 0 FXDWG ... 0 TRUE 4.7 0 12409 Dealer Salvage False FALSE 0.05356 rows × 22 columnsdf.Mileage.fillna(df.Mileage.mean())#用均值填补。适用于数值型变量0 16000.01 60.02 25763.03 33142.04 17800.05 0.06 5548.07 17868.08 2800.09 3000.01030.011 5800.012 55000.013 57898.014 22102.015 7792.016 9305.017 1125.018 5500.019 250.020 140.021 25405.022 28888.023 23658.024 13089.025 23546.026 40000.027 3769.028 8700.029 16827.030 15000.031 2900.032 15200.033 10319.034 29544.035 10893.036 35735.037 9908.038 8950.039 5600.040 20000.041 55782.042 1350.043 15400.044 1533.045 22896.046 24742.047 1500.048 51000.049 6650.0... 739014000.073914470.073921617.073931873.07394 7.0739516850.073985307.0739922931.0740415906.074057071.0740668715.0740920788.074103123.074113174.0741370833.0741432549.0741714627.0741835906.0741916033.07420 122277.074226495.0742321756.074244959.0742727877.074285680.074294916.07430 0.0743124245.0743215272.0743448129.0743628510.0743810326.0744121183.0744217410.0744829541.074535468.0745412333.074570.07458 0.0746345135.074642059.0746741618.0746852418.07469.0747423865.0747820851.074792905.0748229201.0748412583.074869305.0Name: Mileage, Length: 5356, dtype: float64df.columnsIndex(['Condition', 'Condition_Desc', 'Price', 'Location', 'Model_Year','Mileage', 'Exterior_Color', 'Make', 'Warranty', 'Model', 'Sub_Model','Type', 'Vehicle_Title', 'OBO', 'Feedback_Perc', 'Watch_Count','N_Reviews', 'Seller_Status', 'Vehicle_Tile', 'Auction', 'Buy_Now','Bid_Count'],dtype='object')df[df['Exterior_Color'].isnull()]#缺失‘外观颜色’的行Condition Condition_Desc Price Location Model_Year Mileage Exterior_Color Make Warranty Model ... Vehicle_Title OBO Feedback_Perc Watch_Count N_Reviews Seller_Status Vehicle_Tile Auction Buy_Now Bid_Count14 Used NaN $5,500 Davenport, Iowa, United States .0 22,102 NaN Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 9.3 NaN 244 Private Seller Clear True FALSE 16.035 Used NaN $7,700 Roselle, Illinois, United States .0 10,893 NaN Harley-Davidson NaN Other ... NaN FALSE 100 NaN 236 NaN Clear False TRUE NaN41 Used NaN $6,800 Hampshire, Illinois, United States .0 55,782 NaN Harley-Davidson Vehicle does NOT have an existing warranty Softail ... NaN TRUE 100 2< 298 Private Seller Clear False TRUE NaN55 Used NaN $29,500 Parma, Michigan, United States 1950.0 8,471 NaN Harley-Davidson NaN Other ... NaN TRUE 100 24 216 NaN Clear False TRUE NaN72 Used NaN $6,500 Bourbonnais, Illinois, United States 1986.0 55,300 NaN Harley-Davidson NaN Touring ... NaN TRUE 100 2< 1 Private Seller Clear False TRUE NaN79 Used NaN $18,799 Pekin, Illinois, United States .0 3,400 NaN Harley-Davidson NaN Touring ... NaN FALSE 100 6< 2653 NaN Clear False TRUE NaN82 Used and its a show bike, everything on the fr... $500 Columbus, Indiana, United States .0 13,000 NaN Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE NaN 3< 76 owner Clear True TRUE 3.091 Used NaN $6,950 Addison, Illinois, United States .0 20,000 NaN Harley-Davidson NaN Softail ... NaN TRUE 100 2< 8 NaN Clear False TRUE NaN98 Used NaN $12,500 McHenry, Illinois, United States .0 30,200 NaN Harley-Davidson NaN Touring ... NaN FALSE 100 NaN 1881 NaN Clear True FALSE 0.0108 Used NaN $9,500 Hartland, Michigan, United States .0 28,000 NaN Harley-Davidson NaN Touring ... NaN TRUE 100 5< 18 owner Clear False TRUE NaN114 Used NaN $2,899 Elkhart, Indiana, United States 1975.0 17,936 NaN Honda Vehicle does NOT have an existing warranty Gold Wing ... NaN FALSE 100 41 3218 Dealer Clear True TRUE 0.0118 Used NaN $7,400 Mount Sterling, Illinois, United States 1999.0 27,000 NaN Harley-Davidson NaN Softail ... NaN FALSE 100 NaN 107 NaN Clear True FALSE 29.0134 Used NaN $1,300 Markleville, Indiana, United States 1995.0 1 NaN Harley-Davidson NaN Dyna ... NaN FALSE 7.8 NaN 133 NaN Clear True FALSE 0.0136 Used NaN $2,200 Thiensville, Wisconsin, United States 1980.0 35,200 NaN Honda Vehicle does NOT have an existing warranty CB ... NaN TRUE 100 15 277 NaN Clear False TRUE NaN142 Used NaN $19,600 Pierre, South Dakota, United States .0 25,976 NaN Harley-Davidson Vehicle has an existing warranty Touring ... NaN FALSE 100 NaN 40 NaN Clear True FALSE 59.0146 Used NaN $1,700 Chicago, Illinois, United States 1979.0 1,600 NaN Yamaha NaN Other ... NaN FALSE 100 NaN 162 NaN Clear True FALSE 0.0148 Used The cleanest Model you will find anywhere $12,500 Milan, Michigan, United States .0 3,435 NaN BMW NaN R-Series ... NaN FALSE 9.8 34 34576 Private Seller Clear False TRUE NaN156 Used NaN $19,600 Pierre, South Dakota, United States .0 25,976 NaN Harley-Davidson Vehicle has an existing warranty Touring ... NaN FALSE 100 NaN 40 NaN Clear True FALSE 59.0159 Used NaN $10,700 Riverview, Michigan, United States .0 4,300 NaN Harley-Davidson NaN Softail ... NaN TRUE 100 8< 651 Private Seller Clear False TRUE NaN163 Used NaN $6,500 Sycamore, Illinois, United States .0 14,500 NaN Harley-Davidson NaN Sportster ... NaN TRUE 100 NaN 13 Private Seller Clear False TRUE NaN171 Used NaN $21,300 Headland, Alabama, United States .0 1,200 NaN Harley-Davidson NaN Touring ... NaN FALSE 100 NaN 187 Private Seller Clear True FALSE 5.0172 Used NaN $8,200 Milwaukee, Wisconsin, United States .0 49,000 NaN BMW NaN R-Series ... NaN FALSE 100 NaN 40 NaN Clear True FALSE 0.0175 Used NaN $13,600 Hagerstown, Maryland, United States 1966.0 18,441 NaN Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 NaN 110 Private Seller Clear True FALSE 23.0184 Used NaN $1,691 Lebanon, Pennsylvania, United States 1975.0 8,603 NaN Kawasaki NaN Other ... NaN FALSE 100 NaN 210 NaN Clear True FALSE 14.0196 Used NaN $12,600 Rollinsford, New Hampshire, United States 1983.0 30 NaN Harley-Davidson NaN Other ... NaN FALSE 100 NaN 343 NaN Clear True FALSE 67.0219 Used NaN $1,691 Lebanon, Pennsylvania, United States 1975.0 8,603 NaN Kawasaki NaN Other ... NaN FALSE 100 NaN 210 NaN Clear True FALSE 14.0232 Used NaN $12,600 Rollinsford, New Hampshire, United States 1983.0 30 NaN Harley-Davidson NaN Other ... NaN FALSE 100 NaN 343 NaN Clear True FALSE 67.0249 Used NaN $10,300 New Madrid, Missouri, United States .0 4,211 NaN Harley-Davidson Vehicle has an existing warranty Touring ... NaN FALSE 100 NaN 102 Private Seller Clear True FALSE 3.0256 Used NaN $6,000 Douglas City, California, United States 1996.0 5,900 NaN Harley-Davidson NaN Other ... NaN TRUE 100 8< 738 NaN Clear False TRUE NaN276 Used NaN $8,200 Cortland, Ohio, United States .0 10,298 NaN Harley-Davidson NaN Touring ... NaN TRUE 100 15 119 Private Seller Clear False TRUE NaN287 Used NaN $10,995 Jefferson City, Missouri, United States 2001.0 23,963 NaN Harley-Davidson NaN Softail ... NaN FALSE 100 NaN 592 NaN Clear True FALSE 0.0289 Used NaN $8,500 Chillicothe, Ohio, United States 1946.0 25,000 NaN Harley-Davidson NaN Touring ... NaN FALSE 9.7 98 1546 NaN Clear True TRUE 0.0299 Used NaN $11,700 Monroe City, Indiana, United States .0 2,700 NaN Honda NaN Gold Wing ... NaN FALSE 100 NaN 76 Private Seller Clear True FALSE 39.0304 Used NaN $28,000 Mesa, Arizona, United States .0 5,000 NaN Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 6< 571 Private Seller Clear False TRUE NaN310 Used NaN $5,750 Lake Worth, Florida, United States .0 83,260 NaN Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN TRUE NaN 7< 59 Private Seller Clear False TRUE NaN327 Used NaN $8,500 Spring Hill, Florida, United States 1972.0 500 NaN Harley-Davidson NaN Other ... NaN TRUE 100 26 2488 NaN Clear False TRUE NaN343 Used Motorcycle is a 9.5 out of 10. Could be on the... $25,000 Everett, Massachusetts, United States .0 500 NaN Harley-Davidson Vehicle has an existing warranty Touring ... NaN FALSE 100 NaN 95 Private Seller Clear True FALSE 0.0349 Used NaN $1,025 Staunton, Virginia, United States .0 1,586 NaN Harley-Davidson NaN Touring ... NaN FALSE 100 6< 51 NaN Clear True TRUE 2.0358 Used Motorcycle is a 9.5 out of 10. Could be on the... $25,000 Everett, Massachusetts, United States .0 500 NaN Harley-Davidson Vehicle has an existing warranty Touring ... NaN FALSE 100 NaN 95 Private Seller Clear True FALSE 0.0368 Used NaN $1,025 Staunton, Virginia, United States .0 1,586 NaN Harley-Davidson NaN Touring ... NaN FALSE 100 6< 51 NaN Clear True TRUE 2.0371 Used NaN $31,500 Lee, New Hampshire, United States .0 554 NaN Harley-Davidson Vehicle has an existing warranty Touring ... NaN TRUE 100 2< 352 Dealer Clear False TRUE NaN373 Used NaN $28,990 West Palm Beach, Florida, United States .0 510 NaN Harley-Davidson Vehicle has an existing warranty Touring ... NaN FALSE 100 NaN 1156 Dealer Clear True FALSE 0.0384 Used NaN $18,500 Bethlehem, Pennsylvania, United States 1939.0 600 NaN Harley-Davidson Vehicle does NOT have an existing warranty Other ... NaN FALSE 100 NaN 141 NaN Clear True FALSE 0.0392 Used NaN $11,700 Monroe City, Indiana, United States .0 2,700 NaN Honda NaN Gold Wing ... NaN FALSE 100 NaN 76 Private Seller Clear True FALSE 39.0416 Used Bike is like New! If you are interested in a B... $15,900 Greenwood, South Carolina, United States 1995.0 12,107 NaN Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN TRUE 100 49 123 Dealer Clear False TRUE NaN434 Used NaN $5,600 Middletown, Connecticut, United States 1994.0 61,000 NaN Harley-Davidson NaN Touring ... NaN TRUE 100 10 791 Private Seller Clear False TRUE NaN437 Used NaN $8,500 Chillicothe, Ohio, United States 1951.0 34,039 NaN Harley-Davidson NaN Touring ... NaN FALSE 9.7 53 1546 NaN Clear True TRUE 0.0445 Used NaN $8,099 Fair Lawn, New Jersey, United States .0 18,020 NaN Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 NaN 175 Private Seller Clear True FALSE 14.0459 Used NaN $5,600 Middletown, Connecticut, United States 1994.0 61,000 NaN Harley-Davidson NaN Touring ... NaN TRUE 100 10 791 Private Seller Clear False TRUE NaN464 Used NaN $8,500 Chillicothe, Ohio, United States 1951.0 34,039 NaN Harley-Davidson NaN Touring ... NaN FALSE 9.7 53 1546 NaN Clear True TRUE 0.0... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...5913 Used NaN $685 Warminster, Pennsylvania, United States 1982.0 0 NaN Honda NaN cr ... NaN FALSE 100 NaN 254 NaN Rebuilt, Rebuildable & Reconstructed True FALSE 4.05914 Used NaN $9,000 Old Saybrook, Connecticut, United States 1980.0 7,802 NaN Other Makes NaN NaN ... NaN FALSE 100 NaN 1166 NaN Clear True FALSE 0.05917 Used Only 9500 miles on cams still very good condition $120 Ventura, California, United States .0 9,500 NaN Harley-Davidson NaN Dyna ... NaN FALSE 100 NaN 75 NaN Salvage True TRUE 0.05943 Used See Pictures / Mileage Unknown $2,400 North Hollywood, California, United States .0 99,999 NaN Suzuki NaN GSX-R ... NaN TRUE 9.6 5< 15713 NaN Salvage False TRUE NaN5951 Used NaN $3,500 Kitchener, Ontario, Canada 1974.0 56,771 NaN Other Makes NaN NaN ... NaN TRUE 100 20 10 NaN NaN False TRUE NaN5955 Used See Pictures / Mileage Unknown $2,400 North Hollywood, California, United States .0 99,999 NaN Suzuki NaN GSX-R ... NaN TRUE 9.6 5< 15713 NaN Salvage False TRUE NaN5971 Used See Pictures $3,700 North Hollywood, California, United States .0 6,815 NaN Kawasaki NaN Ninja ... NaN TRUE 9.6 NaN 15713 NaN Salvage False TRUE NaN5973 Used NaN $950 Dundalk, Maryland, United States 1975.0 3,426 NaN Yamaha Vehicle does NOT have an existing warranty RD 60 ... NaN FALSE 100 NaN 801 Private Seller Salvage True FALSE 0.05992 Used NaN $2,999 Omaha, Nebraska, United States .0 15,000 NaN BMW NaN F-Series ... NaN TRUE 100 6< 448 NaN Salvage False TRUE NaN6005 Used NaN $7,000 Pleasantville, New Jersey, United States 1998.0 2,200 NaN CR500R NaN NaN ... NaN FALSE 100 6< 167 NaN Rebuilt, Rebuildable & Reconstructed False TRUE NaN6013 Used NaN $11,334 Boring, Oregon, United States 1923.0 999,999 NaN Indian Vehicle does NOT have an existing warranty scout ... NaN FALSE 100 NaN 137 Private Seller Salvage True FALSE 52.06019 Used Bike is a ONE OWNER and garage kept since new ... $3,750 Airville, Pennsylvania, United States .0 1,755 NaN Honda NaN XR ... NaN TRUE 100 6< 2951 NaN Clear False TRUE NaN6021 Used Bike is a ONE OWNER and garage kept since new ... $4,750 Airville, Pennsylvania, United States .0 1,755 NaN Honda NaN XR ... NaN TRUE 100 7< 2951 NaN Clear False TRUE NaN6029 Used NaN $900 Cold Spring, New York, United States 1964.0 3,908 NaN Yamaha Vehicle does NOT have an existing warranty Other ... NaN FALSE 100 1< 80 Private Seller Salvage True TRUE 0.06049 Used Original $260 Monroe City, Missouri, United States 1973.0 5,991 NaN Honda NaN XL ... NaN FALSE 100 8< 1375 NaN Rebuilt, Rebuildable & Reconstructed True TRUE 0.06051 Used NaN $2,000 Westminster, Maryland, United States 1971.0 NaN NaN Yamaha NaN DT1 250 ... NaN TRUE 100 5< 4 NaN Rebuilt, Rebuildable & Reconstructed False TRUE NaN6054 Used NaN $12,000 Mount Vernon, New York, United States .0 20,000 NaN Other Makes NaN NaN ... NaN TRUE 100 NaN 149 NaN Clear False TRUE NaN6065 Used NaN $18,500 Greenwood, Arkansas, United States .0 8,800 NaN Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE NaN 1< 0 Private Seller Rebuilt, Rebuildable & Reconstructed False TRUE NaN6106 Used NaN $2,600 Charlotte, North Carolina, United States .0 1,193 NaN Custom Built Motorcycles Vehicle does NOT have an existing warranty Chopper ... NaN FALSE 100 NaN 144 Private Seller Rebuilt, Rebuildable & Reconstructed True FALSE 18.06109 Used NaN $3,500 Lee's Summit, United States .0 2,000 NaN Kawasaki NaN KLR ... NaN FALSE NaN 7< 1 NaN NaN False TRUE NaN6120 Used In need of full restoration $1,500 Stockton, California, United States 1986.0 10,808 NaN Honda Vehicle does NOT have an existing warranty Rebel ... NaN TRUE 6.5 NaN 998 Private Seller Rebuilt, Rebuildable & Reconstructed False TRUE NaN6144 Used We are selling a Victory Judge , customize... $14,500 Levis, Quebec, Canada NaN NaN NaN NaN NaN NaN ... NaN TRUE 100 15 196 NaN NaN False TRUE NaN6149 Used NaN $6,000 Leesburg, Florida, United States .0 65 NaN Husqvarna NaN FC450 ... NaN TRUE 100 2< 15 Private Seller Salvage False TRUE NaN6163 Used Used bike not running $4,867 Dallas, Texas, United States 1977.0 14,999 NaN Benelli Vehicle does NOT have an existing warranty 750 Sei ... NaN FALSE 100 29 1111 Dealer Salvage True TRUE 9.06164 Used NaN $10,000 Mascouche, Quebec, Canada NaN NaN NaN NaN NaN NaN ... NaN TRUE 100 NaN 3 NaN NaN False TRUE NaN6167 Used NaN $750 Elkton, Virginia, United States 1967.0 0 NaN Ducati NaN Cadet 100 ... NaN FALSE NaN NaN 79 Private Seller Rebuilt, Rebuildable & Reconstructed True FALSE 0.06168 Used NaN $1,950 Charlottesville, Virginia, United States 1987.0 21,900 NaN Suzuki None SV ... NaN FALSE 100 2< 2 Private Seller Clear False TRUE NaN6169 Used NaN $3,100 Denver, Colorado, United States 1979.0 12,345 NaN Can-Am Vehicle does NOT have an existing warranty NaN ... NaN TRUE 9.1 15 222 NaN Rebuilt, Rebuildable & Reconstructed False TRUE NaN6171 Used NaN $4,300 Chandler, Arizona, United States .0 8,300 NaN Kawasaki Vehicle does NOT have an existing warranty Vulcan ... NaN TRUE NaN 5< 0 Private Seller Rebuilt, Rebuildable & Reconstructed False TRUE NaN6178 Used NaN $4,400 Villa Park, California, United States .0 16,000 NaN Aprilia NaN NaN ... NaN TRUE 100 7< 179 NaN Salvage False TRUE NaN6184 Used NaN $5,995 Terrebonne, Quebec, Canada NaN NaN NaN NaN NaN NaN ... NaN FALSE NaN 4< 0 NaN NaN False TRUE NaN6187 Used NaN $7,900 Wantagh, New York, United States 2001.0 7,633 NaN Bourget NaN NaN ... NaN TRUE 100 2< 870 NaN Salvage False TRUE NaN6188 Used NaN $4,000 Chandler, Arizona, United States .0 8,300 NaN Kawasaki Vehicle does NOT have an existing warranty Vulcan ... NaN TRUE NaN NaN 0 Private Seller Rebuilt, Rebuildable & Reconstructed False TRUE NaN6208 Used NaN $3,000 Gainesville, Texas, United States 1949.0 0 NaN Cushman Vehicle does NOT have an existing warranty Package Kar ... NaN FALSE 100 NaN 126 Private Seller Rebuilt, Rebuildable & Reconstructed True FALSE 0.06216 Used NaN $3,000 Georgetown, Ontario, Canada 2001.0 3,500 NaN Yamaha NaN YZF ... NaN FALSE NaN 4< 0 NaN NaN False TRUE NaN6223 Used Refinished $99 Chico, California, United States 1968.0 NaN NaN Bultaco NaN 5-speed models ... NaN FALSE 100 NaN 296 Private Seller Salvage True FALSE 0.06226 Used NaN $6,555 Mundelein, Illinois, United States .0 15,251 NaN Honda NaN Other ... NaN TRUE >80 NaN 442 Dealer Clear False FALSE NaN6228 Used 100% RECONSTRUCTION $16,000 Praha, Czech Republic 1968.0 0 NaN Ural NaN IMZ ... NaN FALSE 8.6 NaN 106 NaN Rebuilt, Rebuildable & Reconstructed True FALSE 0.06232 Used NaN $51,995 Charlotte, North Carolina, United States .0 6,685 NaN Harley-Davidson Vehicle has an existing warranty Other ... NaN TRUE 8.2 NaN 80 Dealer Clear False FALSE NaN6277 Used NaN $3,999 Miami, Florida, United States .0 5,099 NaN Kawasaki NaN Other ... NaN TRUE 100 NaN 51 Dealer Clear False FALSE NaN6348 Used NaN $4,990 Villa Park, Illinois, United States .0 0 NaN Suzuki NaN GSX-R ... NaN TRUE NaN NaN 647 Dealer Clear False FALSE NaN6934 Used NaN $11,500 Pori, default, Finland .0 190,000 NaN Other Makes NaN 316i ... NaN FALSE NaN NaN 0 Private Seller Rebuilt, Rebuildable & Reconstructed False TRUE NaN7237 Used NaN $3,900 London, Kentucky, United States .0 9,829 NaN Hyosung NaN Aquila ... NaN TRUE 3.3 NaN 309 Dealer Clear False FALSE NaN7320 Used NaN $300 Charlottetown, Prince Edward Island, Canada .0 111,111 NaN Victory NaN NaN ... NaN TRUE NaN 8< 0 NaN NaN False TRUE NaN7321 Used NaN $250 Charlottetown, Prince Edward Island, Canada .0 111,111 NaN Victory NaN NaN ... NaN TRUE NaN 2< 0 NaN NaN False TRUE NaN7322 Used NaN $300 Charlottetown, Prince Edward Island, Canada .0 111,111 NaN Victory NaN NaN ... NaN TRUE NaN 4< 0 NaN NaN False TRUE NaN7348 Used NaN $1,000 Holbrook, New York, United States 2002.0 1,775 NaN Honda Vehicle does NOT have an existing warranty CBR ... NaN FALSE 8.4 NaN 769 Dealer Rebuilt, Rebuildable & Reconstructed True FALSE 0.07415 Used NaN $4,300 Raymond, New Hampshire, United States .0 50,572 NaN Harley-Davidson NaN FXDI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7440 Used Please feel free to contact me if you have any... $4,900 Raymond, New Hampshire, United States .0 16,949 NaN Yamaha NaN YZF-R ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7484 Used NaN $5,000 Raymond, New Hampshire, United States .0 12,583 NaN Harley-Davidson NaN FXDI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN715 rows × 22 columnsdf['Exterior_Color'].mode()#求众数,因为众数不止一个,所以返回的是一个列表0 Blackdtype: objectdf['Exterior_Color'].mode()[0]'Black'#对于字符型或者字符串型变量,习惯用众数填补df['Exterior_Color'].fillna(df['Exterior_Color'].mode()[0])0Black1Black2 Silver/Blue3 Red4 Blue5 Red6 Grey / Red / Silver Metallic7Black8Cherry Red9Black10Burgundy11 Black12RICH RED W/STRIPES13 Luxury Rich Red14 Black15 Red16 White17Blue18 Red19 Black20 Black21 Black22 Black & Blue23 Purple24 Black25Blue26 Red27 Red Hot Sun Glo28Burgundy29 Black30 Kandy brandywine31Blue32 Red33 Black34Blue35 Black36 Black37 Red38Burgundy39 Black40 Black41 Black42 Black43 Black44 Black45Blue/Green Metallic46 Vivid Black47 Black48 Black49 Black... 7443 Black7444 Gray7445 Red7446 Gray7447 Black7448 Burgundy7449 Black7450 Black7451maroon7452 Blue7453 TWO TONE7454 Red7455 Black7456Orange7457 Black7458 Blue7459 Black7460 Black7461 Gray7462 Blue7463Orange7464 Black7465 Black7466 Blue7467 Blue7468 White7469 Black7470 White7471 Red7472 TWO TONE7473 White7474 Blue7475 Blue7476 Blue7477 Black7478 Brown7479 Black7480 Green7481 Black7482 Black7483Purple7484 Black7485 Black7486 Black7487 Gray7488 Black7489 Black7490 Red7491 TWO TONE7492 GrayName: Exterior_Color, Length: 7493, dtype: objectdf['Mileage'].median()7083.0df.fillna(value = {'Exterior_Color':'Balck', 'Mileage':7083.0})#用字典的形式填补###元数据生效:inplace = TrueCondition Condition_Desc Price Location Model_Year Mileage Exterior_Color Make Warranty Model ... Vehicle_Title OBO Feedback_Perc Watch_Count N_Reviews Seller_Status Vehicle_Tile Auction Buy_Now Bid_Count0 Used mint!!! very low miles 11412.0 McHenry, Illinois, United States .0 16000.0 Black Harley-Davidson Unspecified Touring ... NaN FALSE 8.1 NaN 2427 Private Seller Clear True FALSE 28.01 Used Perfect condition 17200.0 Fort Recovery, Ohio, United States .0 60.0 Black Harley-Davidson Vehicle has an existing warranty Touring ... NaN FALSE 100 17 657 Private Seller Clear True TRUE 0.02 Used NaN 3872.0 Chicago, Illinois, United States 1970.0 25763.0 Silver/Blue BMW Vehicle does NOT have an existing warranty R-Series ... NaN FALSE 100 NaN 136 NaN Clear True FALSE 26.03 Used CLEAN TITLE READY TO RIDE HOME 6575.0 Green Bay, Wisconsin, United States .0 33142.0 Red Harley-Davidson NaN Touring ... NaN FALSE 100 NaN 2920 Dealer Clear True FALSE 11.04 Used NaN 10000.0 West Bend, Wisconsin, United States .0 17800.0 Blue Harley-Davidson NO WARRANTY Touring ... NaN FALSE 100 13 271 OWNER Clear True TRUE 0.05 Used It's a '72 in good shape 1500.0 Watervliet, Michigan, United States 1972.0 0.0 Red Harley-Davidson Vehicle does NOT have an existing warranty Sportster ... NaN FALSE 100 NaN 412 Private Seller Clear True FALSE 1.06 Used NaN 24900.0 Sterling, Illinois, United States .0 5548.0 Grey / Red / Silver Metallic Harley-Davidson NaN Touring ... NaN FALSE 9.8 NaN 6229 Dealer Clear True FALSE 1.07 Used NaN 1400.0 Williamston, Michigan, United States 1975.0 17868.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Sportster ... NaN FALSE 9.7 NaN 1159 Private Seller Clear True FALSE 6.08 Used NaN 5100.0 Palatine, Illinois, United States .0 2800.0 Cherry Red Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE NaN 16 3 Private Seller Clear True TRUE 6.09 Used NaN 8000.0 Chicago, Illinois, United States .0 3000.0 Black Harley-Davidson Vehicle has an existing warranty Sportster ... NaN FALSE NaN NaN 1 Private Seller Clear True FALSE 0.010 Used NaN 2125.0 Williamston, Michigan, United States 1978.0 30.0 Burgundy Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 9.7 NaN 1159 Private Seller Clear True FALSE 4.011 Used NaN 11100.0 Oak Park, Illinois, United States .0 5800.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 NaN 83 Private Seller Clear True FALSE 21.012 Used NaN 1125.0 Pewaukee, Wisconsin, United States 2002.0 55000.0 RICH RED W/STRIPES Harley-Davidson Vehicle does NOT have an existing warranty Other ... NaN FALSE 100 NaN 128 Private Seller Clear True FALSE 5.013 Used Overall, this bike is in good condition for it... 3550.0 Madison, Wisconsin, United States 2000.0 57898.0 Luxury Rich Red Harley-Davidson Vehicle does NOT have an existing warranty. AS... Touring ... NaN FALSE 100 NaN 10701 Dealer Clear True FALSE 2.014 Used NaN 5500.0 Davenport, Iowa, United States .0 22102.0 Balck Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 9.3 NaN 244 Private Seller Clear True FALSE 16.015 Used NaN 9000.0 Plymouth, Indiana, United States .0 7792.0 Red Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 NaN 299 Private Seller Clear True FALSE 3.016 Used NaN 8100.0 Goshen, Indiana, United States 1973.0 9305.0 White Harley-Davidson Vehicle does NOT have an existing warranty Other ... NaN FALSE 100 NaN 300 Private Seller Clear True FALSE 25.017 Used Absolutely perfect condition 14000.0 Plainfield, Indiana, United States .0 1125.0 Blue Harley-Davidson Vehicle has an existing warranty Softail ... NaN FALSE 100 NaN 170 Private Seller Clear True FALSE 0.018 Used NaN 20000.0 Bellevue, Iowa, United States .0 5500.0 Red Harley-Davidson Vehicle has an existing warranty Touring ... NaN TRUE 100 8< 66 Private Seller Clear False TRUE NaN19 New NaN 13000.0 Des Plaines, Illinois, United States .0 250.0 Black Harley-Davidson Unspecified Softail ... NaN FALSE 100 23 181 Private Seller Clear True TRUE 0.020 New NaN 10900.0 Ottawa, Illinois, United States .0 140.0 Black Harley-Davidson Vehicle has an existing warranty Touring ... NaN TRUE 100 NaN 3172 Private Seller Clear False TRUE NaN21 Used IN AWESOME CONDITION. SUPER RARE. JUST SERVIC... 9999.0 Orland Park, Illinois, United States .0 25405.0 Black Harley-Davidson NaN Softail ... NaN FALSE 100 NaN 283 Dealer Clear True FALSE 0.022 Used NaN 5700.0 Cross Plains, Wisconsin, United States 1982.0 28888.0 Black & Blue Harley-Davidson NaN Other ... NaN FALSE 100 NaN 947 Private Seller Clear True FALSE 0.023 Used NaN 7400.0 Watervliet, Michigan, United States 2001.0 23658.0 Purple Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 NaN 412 Private Seller Clear True FALSE 0.024 Used NaN 26500.0 Kewanee, Illinois, United States .0 13089.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN TRUE 100 15 6 Private Seller Clear False TRUE NaN25 Used NaN 9850.0 Chicago, Illinois, United States .0 23546.0 Blue Harley-Davidson NaN Touring ... NaN FALSE 100 NaN 12 Private Seller Clear True FALSE 0.026 Used NaN 45900.0 South Haven, Michigan, United States .0 40000.0 Red Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 25 199 Private Seller Clear False TRUE NaN27 Used Almost new Harley-Davidson FLHR Road Ki... 10600.0 Wheeling, Illinois, United States .0 3769.0 Red Hot Sun Glo Harley-Davidson NaN Touring ... NaN TRUE 100 22 175 Private Seller Clear False TRUE NaN28 Used * Harley Davidson Rocker C *Chrome Chrome ... 12000.0 Chicago, Illinois, United States .0 8700.0 Burgundy Harley-Davidson Vehicle does NOT have an existing warranty Softail ... NaN FALSE 100 NaN 11 Private Seller Clear True FALSE 0.029 Used NaN 20000.0 Chicago, Illinois, United States .0 16827.0 Black Harley-Davidson NaN TRIKE ... NaN TRUE NaN 31 17 Private Seller Clear False TRUE NaN30 Used Very clean and well maintained 25000.0 Summit-Argo, Illinois, United States .0 15000.0 Kandy brandywine Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 1< 18 Private Seller Clear True TRUE 0.031 Used NaN 20000.0 Coldwater, Michigan, United States .0 2900.0 Blue Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 NaN 142 Private Seller Clear True FALSE 0.032 Used NaN 11000.0 Elkhart, Indiana, United States .0 15200.0 Red Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN TRUE NaN 12 28 Private Seller Clear False TRUE NaN33 Used NaN 8500.0 Glenview NAS, Illinois, United States .0 10319.0 Black Harley-Davidson NaN Touring ... NaN TRUE 100 8< 324 Private Seller Clear False TRUE NaN34 Used NaN 18000.0 Fox River Grove, Illinois, United States .0 29544.0 Blue Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN TRUE 100 NaN 111 Private Seller Clear False TRUE NaN35 Used NaN 7700.0 Roselle, Illinois, United States .0 10893.0 Balck Harley-Davidson NaN Other ... NaN FALSE 100 NaN 236 NaN Clear False TRUE NaN36 Used NaN 2750.0 Belvidere, Illinois, United States .0 35735.0 Black Harley-Davidson Vehicle does NOT have an existing warranty FLH ... NaN FALSE 100 NaN 100 Belvidere Police Department Clear True FALSE 19.037 Used Year ManufacturerHarley-Davidson ModelScre... 10895.0 Kalamazoo, Michigan, United States .0 9908.0 Red Harley-Davidson NaN Softail ... NaN FALSE 100 NaN 1522 Private Seller Clear True FALSE 0.038 Used No Reserve! 6700.0 Tinley Park, Illinois, United States .0 8950.0 Burgundy Harley-Davidson Vehicle does NOT have an existing warranty Softail ... NaN FALSE 100 NaN 126 Private Seller Clear True FALSE 0.039 Used NaN 18000.0 Batavia, Illinois, United States .0 5600.0 Black Harley-Davidson Vehicle has an existing warranty Touring ... NaN FALSE 100 NaN 63 Private Seller Clear True FALSE 0.040 Used NaN 7300.0 Rolling Meadows, Illinois, United States 1997.0 20000.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Sportster ... NaN TRUE 100 5< 111 Private Seller Clear False TRUE NaN41 Used NaN 6800.0 Hampshire, Illinois, United States .0 55782.0 Balck Harley-Davidson Vehicle does NOT have an existing warranty Softail ... NaN TRUE 100 2< 298 Private Seller Clear False TRUE NaN42 Used Dent and scratch free. Paint and chrome in exc... 5000.0 South Bend, Indiana, United States .0 1350.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Sportster ... NaN FALSE 100 14 37 Private Seller Clear False TRUE NaN43 Used Excellent condition gently used. Adult driven 13200.0 Algonquin, Illinois, United States .0 15400.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 NaN 478 Private Seller Clear True FALSE 0.044 Used Excellent condition 11400.0 Indianapolis, Indiana, United States .0 1533.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN FALSE 100 4< 79 Dealer Clear False TRUE NaN45 Used NaN 3250.0 Valparaiso, Indiana, United States .0 22896.0 Blue/Green Metallic Harley-Davidson Vehicle does NOT have an existing warranty Sportster ... NaN FALSE 100 9< 109 Private Seller Clear True TRUE 11.046 Used This is a nice looking Road King. Paint and ch... 8000.0 Madison, Wisconsin, United States .0 24742.0 Vivid Black Harley-Davidson Vehicle does NOT have an existing warranty. AS... Touring ... NaN FALSE 100 NaN 10701 Dealer Clear True FALSE 0.047 Used NaN 17800.0 Webberville, Michigan, United States .0 1500.0 Black Harley-Davidson Vehicle has an existing warranty Touring ... NaN TRUE 100 4< 33 Private Seller Clear False TRUE NaN48 Used NaN 8500.0 Rockford, Illinois, United States .0 51000.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Touring ... NaN TRUE 100 8< 124 Private Seller Clear False TRUE NaN49 Used NaN 4050.0 Gilberts, Illinois, United States .0 6650.0 Black Harley-Davidson Vehicle does NOT have an existing warranty Softail ... NaN FALSE NaN 7< 58 Private Seller Clear True TRUE 3.0... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...7443 Used NaN 7900.0 Raymond, New Hampshire, United States .0 0.0 Black Harley-Davidson NaN FXDBI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7444 Used NaN 5900.0 Raymond, New Hampshire, United States .0 7337.0 Gray Yamaha NaN YZF-R6 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7445 Used NaN 3900.0 Raymond, New Hampshire, United States .0 2669.0 Red Harley-Davidson NaN XG750 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7446 Used NaN 7900.0 Raymond, New Hampshire, United States .0 23440.0 Gray Kawasaki NaN Z1000 G ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7447 Used NaN 23499.0 Suncook, New Hampshire, United States .0 16927.0 Black Harley-Davidson NaN FLHTK ELECTRA GLIDE ULTRA LIMITED ... NaN TRUE 100 NaN 1978 Dealer Clear False FALSE NaN7448 Used Please feel free to contact me if you have any... 6500.0 Raymond, New Hampshire, United States .0 29541.0 Burgundy Harley-Davidson NaN Touring ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7449 Used NaN 6500.0 Raymond, New Hampshire, United States .0 11388.0 Black Harley-Davidson NaN FXDF ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7450 Used NaN 3900.0 Raymond, New Hampshire, United States .0 28117.0 Black Kawasaki NaN ZX-10R ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7451 Used NaN 5200.0 Raymond, New Hampshire, United States .0 12876.0 maroon Suzuki NaN GSX1300R ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7452 Used NaN 3900.0 Raymond, New Hampshire, United States .0 66219.0 Blue Harley-Davidson NaN FXD ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7453 Used Please feel free to contact me if you have any... 8300.0 Raymond, New Hampshire, United States .0 5468.0 TWO TONE Harley-Davidson NaN Softail ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7454 Used NaN 7400.0 Raymond, New Hampshire, United States .0 12333.0 Red Harley-Davidson NaN FLD103 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7455 Used NaN 4700.0 Raymond, New Hampshire, United States .0 424.0 Black Suzuki NaN GSX-S750 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7456 Used NaN 4900.0 Raymond, New Hampshire, United States .0 7552.0 Orange Yamaha NaN YZF-R6 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7457 Used NaN 8500.0 Raymond, New Hampshire, United States .0 0.0 Black Harley-Davidson NaN FXCW ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7458 Used NaN 9200.0 Raymond, New Hampshire, United States .0 0.0 Blue Harley-Davidson NaN FLTRX ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7459 Used NaN 3900.0 Raymond, New Hampshire, United States .0 19268.0 Black Harley-Davidson NaN FXD ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7460 Used NaN 7500.0 Raymond, New Hampshire, United States .0 703.0 Black Suzuki NaN GSX-R1000 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7461 Used NaN 4200.0 Raymond, New Hampshire, United States .0 5883.0 Gray Yamaha NaN XV1700 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7462 Used NaN 6500.0 Raymond, New Hampshire, United States .0 32267.0 Blue Harley-Davidson NaN FLSTFI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7463 Used NaN 7800.0 Raymond, New Hampshire, United States .0 45135.0 Orange Harley-Davidson NaN FLHTCUI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7464 Used NaN 4400.0 Raymond, New Hampshire, United States .0 2059.0 Black Suzuki NaN GSX-S750 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7465 Used NaN 7900.0 Raymond, New Hampshire, United States .0 11679.0 Black Harley-Davidson NaN FXDCI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7466 Used NaN 6500.0 Raymond, New Hampshire, United States .0 1389.0 Blue Suzuki NaN GSX-R600 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7467 Used Salvage Rebuildable Repairable No Reserve NR 7400.0 Raymond, New Hampshire, United States .0 41618.0 Blue Harley-Davidson NaN Touring ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7468 Used NaN 8800.0 Raymond, New Hampshire, United States .0 52418.0 White Harley-Davidson NaN FLHXI ... NaN TRUE 4.7 NaN 12409 Dealer Rebuilt, Rebuildable & Reconstructed False FALSE NaN7469 Used NaN 13570.0 Scott City, Missouri, United States .0 .0 Black Harley-Davidson Vehicle has an existing warranty Dyna Fat Bob ... NaN FALSE 100 NaN 4 Dealer Clear False FALSE NaN7470 Used NaN 7900.0 Raymond, New Hampshire, United States .0 64724.0 White Harley-Davidson NaN FLHTCUI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7471 Used NaN 6200.0 Raymond, New Hampshire, United States .0 55993.0 Red Harley-Davidson NaN FLHTCI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7472 Used NaN 7500.0 Raymond, New Hampshire, United States .0 32560.0 TWO TONE Harley-Davidson NaN FLSTNI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7473 Used NaN 5500.0 Raymond, New Hampshire, United States 2000.0 87123.0 White Harley-Davidson NaN FLSTC ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7474 Used NaN 3400.0 Raymond, New Hampshire, United States .0 23865.0 Blue Harley-Davidson NaN XL 883C ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7475 Used NaN 3900.0 Raymond, New Hampshire, United States .0 56633.0 Blue Harley-Davidson NaN FXD ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7476 Used NaN 8500.0 Raymond, New Hampshire, United States .0 36780.0 Blue Harley-Davidson NaN FLHTCUI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7477 Used NaN 4900.0 Raymond, New Hampshire, United States 2002.0 22709.0 Black Harley-Davidson NaN FXDL ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7478 Used NaN 9900.0 Raymond, New Hampshire, United States .0 20851.0 Brown Harley-Davidson NaN FLTRU ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7479 Used NaN 2900.0 Raymond, New Hampshire, United States .0 2905.0 Black Suzuki NaN SV ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7480 Used NaN 6500.0 Raymond, New Hampshire, United States .0 1701.0 Green Harley-Davidson NaN XL 883N ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7481 Used NaN 10500.0 Raymond, New Hampshire, United States .0 16231.0 Black Harley-Davidson NaN FLTRX ... NaN TRUE 4.7 NaN 12409 Dealer Rebuilt, Rebuildable & Reconstructed False FALSE NaN7482 Used NaN 7200.0 Raymond, New Hampshire, United States .0 29201.0 Black Harley-Davidson NaN FLTRI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7483 Used NaN 7500.0 Raymond, New Hampshire, United States .0 28716.0 Purple Harley-Davidson NaN FLHRCI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7484 Used NaN 5000.0 Raymond, New Hampshire, United States .0 12583.0 Balck Harley-Davidson NaN FXDI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7485 Used NaN 5000.0 Raymond, New Hampshire, United States .0 19931.0 Black Harley-Davidson NaN FXDI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7486 Used NaN 8900.0 Raymond, New Hampshire, United States .0 9305.0 Black Harley-Davidson NaN FXDWG ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7487 Used Please feel free to contact me if you have any... 4900.0 Raymond, New Hampshire, United States .0 3475.0 Gray Suzuki NaN Boulevard ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7488 Used NaN 3900.0 Raymond, New Hampshire, United States .0 23681.0 Black Harley-Davidson NaN FXDI ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7489 Used NaN 8900.0 Raymond, New Hampshire, United States .0 5821.0 Black Suzuki NaN GSX1300RA ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7490 Used NaN 7800.0 Raymond, New Hampshire, United States .0 48616.0 Red BMW NaN R1200GS ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7491 Used NaN 7900.0 Raymond, New Hampshire, United States .0 6185.0 TWO TONE Yamaha NaN YZF-R1 ... NaN TRUE 4.7 NaN 12409 Dealer Salvage False FALSE NaN7492 Used NaN 12970.0 Scott City, Missouri, United States .0 448.0 Gray Harley-Davidson Vehicle has an existing warranty Dyna Street Bob ... NaN FALSE 100 NaN 4 Dealer Clear False FALSE NaN7493 rows × 22 columnsdf['Exterior_Color']#第14行是空值0Black1Black2 Silver/Blue3 Red4 Blue5 Red6 Grey / Red / Silver Metallic7Black8Cherry Red9Black10Burgundy11 Black12RICH RED W/STRIPES13 Luxury Rich Red14 NaN15 Red16 White17Blue18 Red19 Black20 Black21 Black22 Black & Blue23 Purple24 Black25Blue26 Red27 Red Hot Sun Glo28Burgundy29 Black30 Kandy brandywine31Blue32 Red33 Black34Blue35 NaN36 Black37 Red38Burgundy39 Black40 Black41 NaN42 Black43 Black44 Black45Blue/Green Metallic46 Vivid Black47 Black48 Black49 Black... 7443 Black7444 Gray7445 Red7446 Gray7447 Black7448 Burgundy7449 Black7450 Black7451maroon7452 Blue7453 TWO TONE7454 Red7455 Black7456Orange7457 Black7458 Blue7459 Black7460 Black7461 Gray7462 Blue7463Orange7464 Black7465 Black7466 Blue7467 Blue7468 White7469 Black7470 White7471 Red7472 TWO TONE7473 White7474 Blue7475 Blue7476 Blue7477 Black7478 Brown7479 Black7480 Green7481 Black7482 Black7483Purple7484 NaN7485 Black7486 Black7487 Gray7488 Black7489 Black7490 Red7491 TWO TONE7492 GrayName: Exterior_Color, Length: 7493, dtype: objectdf['Exterior_Color'].fillna(method = 'ffill')#前向填补0Black1Black2 Silver/Blue3 Red4 Blue5 Red6 Grey / Red / Silver Metallic7Black8Cherry Red9Black10Burgundy11 Black12RICH RED W/STRIPES13 Luxury Rich Red14 Luxury Rich Red15 Red16 White17Blue18 Red19 Black20 Black21 Black22 Black & Blue23 Purple24 Black25Blue26 Red27 Red Hot Sun Glo28Burgundy29 Black30 Kandy brandywine31Blue32 Red33 Black34Blue35Blue36 Black37 Red38Burgundy39 Black40 Black41 Black42 Black43 Black44 Black45Blue/Green Metallic46 Vivid Black47 Black48 Black49 Black... 7443 Black7444 Gray7445 Red7446 Gray7447 Black7448 Burgundy7449 Black7450 Black7451maroon7452 Blue7453 TWO TONE7454 Red7455 Black7456Orange7457 Black7458 Blue7459 Black7460 Black7461 Gray7462 Blue7463Orange7464 Black7465 Black7466 Blue7467 Blue7468 White7469 Black7470 White7471 Red7472 TWO TONE7473 White7474 Blue7475 Blue7476 Blue7477 Black7478 Brown7479 Black7480 Green7481 Black7482 Black7483Purple7484Purple7485 Black7486 Black7487 Gray7488 Black7489 Black7490 Red7491 TWO TONE7492 GrayName: Exterior_Color, Length: 7493, dtype: objectdf['Exterior_Color'].fillna(method = 'bfill')#后向填补0Black1Black2 Silver/Blue3 Red4 Blue5 Red6 Grey / Red / Silver Metallic7Black8Cherry Red9Black10Burgundy11 Black12RICH RED W/STRIPES13 Luxury Rich Red14 Red15 Red16 White17Blue18 Red19 Black20 Black21 Black22 Black & Blue23 Purple24 Black25Blue26 Red27 Red Hot Sun Glo28Burgundy29 Black30 Kandy brandywine31Blue32 Red33 Black34Blue35 Black36 Black37 Red38Burgundy39 Black40 Black41 Black42 Black43 Black44 Black45Blue/Green Metallic46 Vivid Black47 Black48 Black49 Black... 7443 Black7444 Gray7445 Red7446 Gray7447 Black7448 Burgundy7449 Black7450 Black7451maroon7452 Blue7453 TWO TONE7454 Red7455 Black7456Orange7457 Black7458 Blue7459 Black7460 Black7461 Gray7462 Blue7463Orange7464 Black7465 Black7466 Blue7467 Blue7468 White7469 Black7470 White7471 Red7472 TWO TONE7473 White7474 Blue7475 Blue7476 Blue7477 Black7478 Brown7479 Black7480 Green7481 Black7482 Black7483Purple7484 Black7485 Black7486 Black7487 Gray7488 Black7489 Black7490 Red7491 TWO TONE7492 GrayName: Exterior_Color, Length: 7493, dtype: object
欢迎阅读数据清洗系列文章:python数据清洗工具、方法、过程整理归纳
一、数据清洗之常用工具——numpy,pandas二、数据清洗之文件读写——读取csv、Excel和MySQL数据三、数据清洗之数据表操作——数据筛选、增加删除、查找修改、数据整理和层次化索引四、数据清洗之数据转换——日期格式数据处理、高阶函数数据处理、字符串数据处理五、数据清洗之数据统计——数据分组运算、聚合函数使用、分组对象和apply函数、透视图与交叉表
python数据清洗工具 方法 过程整理归纳(六 数据清洗之数据预处理(一)——重复值处理 缺失值处理)