简体   繁体   English

Spotfire类别

[英]Spotfire categorizations

I have a set of data from a python script I need to put into spotfire (it's movement data of machines) and I have trouble with consistently getting spotfire to recognize the relevant numbers as numbers, rather than as a different categorization, say "categories" in the left side data box. 我从python脚本中获取了一组数据,需要放入Spotfire中(它是机器的运动数据),而且始终无法让Spotfire将相关数字识别为数字,而不是将其识别为不同的类别,例如“类别”在左侧的数据框中。 Here's a sample of the data: 这是数据示例:

    Id            Name     Date          X        Y       Z       Lat        Long
04a3169a302f    Trukki  28.3.2018 8:48  0.03522 0.03089 14.88   60.4   26.94
 04a3169a302f   Trukki  28.3.2018 8:48  0.03526 0.03153 15.52   0.64    60.47   26.94

The X, Y and Z data should be read as numbers (I think) but I often do not always get the option to select them as such. X,Y和Z数据应读取为数​​字(我认为),但我通常不总是可以选择这样的数字。 I don't know if this is cos of the source data (csv files) but I suspect it's whether they are integers or long integers. 我不知道这是源数据(csv文件)的cos,但我怀疑这是整数还是长整数。 Usually they come in as type string and they can't later be changed to numbers and that effects how I can manipulate the data 通常它们以字符串类型出现,以后无法更改为数字,这影响了我如何处理数据

If someone could point me to tutorial of how spotfire categorizes data (identifiers, location, time, numbers, etc) it would really help. 如果有人可以向我介绍Spotfire如何对数据(标识符,位置,时间,数字等)进行分类的教程,那将真正有帮助。

I hope this is clear. 我希望这很清楚。 Help appreciated. 帮助表示赞赏。

My understanding is that Spotfire looks at the first several (not sure of the exact number) observations in each column and tries to guess the data type. 我的理解是,Spotfire会查看每列中的前几个(不确定确切的数字)观察值,并尝试猜测数据类型。 It will end up guessing string if there is a single observation of any kind of word in this set of observations. 如果在这组观察中只有一个观察到任何种类的单词,它将最终猜测字符串。

For example, if my csv looks like: 例如,如果我的csv看起来像:

Id,Name,Date,X,Y,Z,Lat,Long
04a3169a302f,Trukki,28.3.2018 8:48,0.03522,0.03089,14.88,60.4,26.94
04a3169a302f,Trukki,28.3.2018 8:48,0.03526,0.03153,15.52,0.64,60.47
04a3169a302f,Trukki,28.3.2018 8:48,NULL,0.03153,15.52,0.64,60.47

then Spotfire will guess string as the datatype for the X field. 然后Spotfire将猜测字符串作为X字段的数据类型。 Note that I removed the 26.94 at the end of your sample data as it did not seem to belong. 请注意,我删除了样本数据末尾的26.94,因为它似乎不属于该数据。

Another possibility is if there is a comma in the Name column, this could offset your data and cause the Date field's data to be shifted over by one, which is also read in as a string. 另一种可能性是,如果“名称”列中有逗号,则这可能会使您的数据偏移并导致“日期”字段的数据移位一个,该数据也作为字符串读入。 Thus the X field would be read in as a string as well. 因此,X字段也将作为字符串读入。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM