q**j 发帖数: 10612 | 1 【 以下文字转载自 Programming 讨论区 】
发信人: qqzj (小车车), 信区: Programming
标 题: Python:请问如何把list变成structured array。
发信站: BBS 未名空间站 (Fri May 1 15:52:21 2009)
我总是把数据从.csv或者SQL里面读入,成为list。但是现在要把他们变成容易操作的
形式。用了Numpy以后,array(whatever)把所有的东西都变成了一种形式。很不方便
。请问用没有办法直接把数据从list形式转化成structured array?多谢指教。 | c**********e 发帖数: 2007 | 2 I have a datasets with 3 variables. Weight and Height are continuous.
A categorical variable cat=1 or 0.
I would make a scatter plot weight*height. For subjects with cat=1 and 0,
I would like to have two different colors or shapes.
Does anybody have an idea? Thanks. |
|