2017-10-14 265 views
0

enter image description herehow to convert these datasets into valid datasets ,to do further case study如何RAW数据集转换成标准化的数据集

我抄这些数据集,现在我想在标准化形式这些数据集,我是一个初学者机智对于数据的科学,所以我怎么能通过使用Python代码

IS_MOBILE,n_products_viewed,visit_duration,is_returning_visitor,TIME_OF_DAY进一步做,user_action 1,0,0.657509946,0,3,0 1,1,0.568571234,0,2,1 1,0, 0.042245997,1,1,0 1,1,1.659793381,1,1,2 0,1,2.014744849,1,1,2 1,1,0.512447387,1,1,2 0,0,1.440327098,1,1,0 1,0,0.035260233,0,3,0 0,1,1.490764094,0,0,1 0 ,0,0.005837521,1,3,0 0,4,2.04604049,1,0,3 0,0,0.955889466,0,3,0

+0

它会更好,如果你已经发布你的RAW数据集和预期的数据集...以文本形式 – RomanPerekhrest

+0

是好的sir.n预计是连续和列明智的应该得到设置 – user8747401

+0

也发布* standardize形式* – RomanPerekhrest

回答

0

我假定您正在整理您的数据。以下是对整洁数据的定义的一般让步。

Each variable you measure should be in one column. 
Each different observation of that variable should be in a different row. 
There should be one table for each "kind" of variable. 
If you have multiple tables, they should include a column in the table that allows them to be linked. 

https://en.wikipedia.org/wiki/Tidy_data

我DONOT看到任何问题与具有逗号作为分隔符。 pandas可以用pandas.read_csv()加载csv。

如果你想做一些清理和重新排列的数据,你可以使用pivot_table和融合熊猫库的方法。