2016-03-22 9 views
0

パンダを使用して統計モデルをコーディングしようとしています。まず、単純な平均値と中央値のチェックを行うことから始めたいと思います。私は下のcsvにデータを示しました。あなたのデータのうちcsvのデータのパンダ分析

NoteDate Fuel StartDate BestContactTime PriceDisplay IsBold Make Transmission Category Owners HasFreeShipping Year EngineSize AsAt IsDealer Doors ExteriorColour Odometer StartPrice NumberPlate ImportHistory EndDate Cylinders Title Vin CategoryPath WofExpires BodyStyle ListingLength Suburb StereoDescription ListingId Region Model RegistrationExpires 
    /Date(0)/ Petrol /Date(1457523875033)/ Evening $17,985 TRUE Audi Automatic 0001-0268-0271- 0 TRUE 2005 2000 /Date(1457854140345)/ FALSE 0 Dark Blue 61988 17985 ABC123  /Date(1458128675033)/ 0 Audi A4 Test887 2005 WAUZZZ8EX5A457186 /Trade-Me-Motors/Cars/Audi /Date(0)/ Sedan  Whangarei  4554769 Northland A4 /Date(0)/ 
    /Date(0)/ Petrol /Date(1457525091850)/ Evening $17,985 TRUE Audi Automatic 0001-0268-0271- 0 TRUE 2005 2000 /Date(1457854140345)/ FALSE 0 Dark Blue 61988 17985 ABC123  /Date(1458129891850)/ 0 Audi A4 Test biz1 2005 WAUZZZ8EX5A457186 /Trade-Me-Motors/Cars/Audi /Date(0)/ Sedan  Whangarei  4554770 Northland A4 /Date(0)/ 
    /Date(0)/ Petrol /Date(1457530941643)/ Evening $17,985 TRUE Audi Automatic 0001-0268-0271- 0 TRUE 2005 2000 /Date(1457854140345)/ FALSE 0 Dark Blue 61988 17985 ABC123  /Date(1458135741643)/ 0 Audi A4 Test123 2005 WAUZZZ8EX5A457186 /Trade-Me-Motors/Cars/Audi /Date(0)/ Sedan  Whangarei  4554773 Northland A4 /Date(0)/ 
    /Date(0)/ Petrol /Date(1457532268097)/ Evening $17,985 TRUE Audi Automatic 0001-0268-0271- 0 TRUE 2005 2000 /Date(1457854140345)/ FALSE 0 Dark Blue 61988 17985 ABC123  /Date(1458137068097)/ 0 Audi A4 Luxary Ship for Sale 2005 WAUZZZ8EX5A457186 /Trade-Me-Motors/Cars/Audi /Date(0)/ Sedan  Whangarei  4554774 Northland A4 /Date(0)/ 
    /Date(0)/ Petrol /Date(1457612061090)/ Evening $17,985 TRUE Audi Automatic 0001-0268-0271- 0 TRUE 2005 2000 /Date(1457854140345)/ FALSE 0 Dark Blue 61988 17985 ABC123  /Date(1458216861090)/ 0 Audi A4 Well Established, EST T/O $8.8M, Owne 2005 WAUZZZ8EX5A457186 /Trade-Me-Motors/Cars/Audi /Date(0)/ Sedan  Whangarei  4557063 Northland A4 /Date(0)/ 
+2

なぜシリーズに変換する必要がありますか?また、このcsvスニペットは、実際にcsvがあなたのコードと同じように見えるかどうかは、スペースデリミターとコンマではないので正しく解析しません。なぜあなたのデータには '/'がありますか? – EdChum

答えて

-1

まず、あなたがそれらの "/" と取得したいとしている "":CSVで

import pandas 

df = pandas.read_csv('audi-a4.csv', index_col=False, header=0); 
serie = df.transpose() # here we convert the DataFrame into a Se 
x = serie.describe() 
print(serie) 
print(x) 

データを:私が試したもの

フレーム。列の平均については、pandasのdf.mean()関数を使用できます。

関連する問題