google 云平台Automl

google cloud plateform Auto ML

大家好,我正在尝试在 "AutoML Tables" 中导入 table,只是为了测试,我创建了一个带有随机数的 table,所以请不要介意。 每次我测试尝试导入 table 似乎都不起作用 我的 CSV 文件似乎没有任何问题。只有字母数字字符,没有空单元格,只有用于测试的数字数据 3 列,300 行 ... 但不,它不起作用,它告诉我:

Error Messages: Invalid column names:

我的列名称是:房间,或,价格。 我不知道这些名字有什么问题...

感谢您的帮助

enter image description here

我试过带引号和不带引号

"id","rooms","OR","price","space","toilets"
0,5,8,200,200,1
1,5,8,200,200,1
2,5,8,200,200,1
3,5,8,200,200,1
4,5,8,200,200,1
5,5,8,200,200,1
6,5,8,200,200,1
7,5,8,200,200,1
8,5,8,200,200,1
9,5,8,200,200,1
10,5,8,200,200,1
11,5,8,200,200,1
12,7,9,300,400,2
13,7,9,300,400,2
14,7,9,300,400,2
15,7,9,300,400,2

我在创建带有索引列的 CSV 文件时重现了这个问题。

import pandas as pd

columns = ["id","rooms","OR","price","space","toilets"]
data = [
    [0,5,8,200,200,1],
    [1,5,8,200,200,1],
    [2,5,8,200,200,1],
    [3,5,8,200,200,1],
    [4,5,8,200,200,1],
    [5,5,8,200,200,1],
    [6,5,8,200,200,1],
    [7,5,8,200,200,1],
    [8,5,8,200,200,1],
    [9,5,8,200,200,1],
    [10,5,8,200,200,1],
    [11,5,8,200,200,1],
    [12,7,9,300,400,2],
    [13,7,9,300,400,2],
    [14,7,9,300,400,2],
    [15,7,9,300,400,2]
]

df = pd.DataFrame(data=data, columns=columns)
# resampled the data to avoid AutoMLTables error: 
# Too few rows: 16. Minimum number is: 1000
df = df.sample(1000, replace=True)
df.to_csv('/your/data/path/here', index=True)

但如果我将 index 设置为 False 并重新创建文件,导入就会成功。

也有可能早期版本的 AutoMLTables 不喜欢您使用保留关键字 id 作为列名,但这不太可能。