在XAMPP中上传csv数据集

时间:2018-03-06 08:31:23

标签: phpmyadmin xampp

我想在Xampp上传一个csv文件。我的数据的基本结构是:

"age";"job";"marital";"education";"default";"housing";"loan";"contact";"month";"day_of_week";"duration";"campaign";"pdays";"previous";"poutcome";"emp.var.rate";"cons.price.idx";"cons.conf.idx";"euribor3m";"nr.employed";"y"
 56;"housemaid";"married";"basic.4y";"no";"no";"no";"telephone";"may";"mon";261;1;999;0;"nonexistent";1.1;93.994;-36.4;4.857;5191;"no"
 57;"services";"married";"high.school";"unknown";"no";"no";"telephone";"may";"mon";149;1;999;0;"nonexistent";1.1;93.994;-36.4;4.857;5191;"no"

在上传之前,我填写了以下基本数据要求:

 Enable foreign key check
 Columns separated with:    ;
 Columns enclosed with:
 Columns escaped with:
 Lines terminated with:    auto

但是在上传我的数据集之后,它只显示了COL1,COL 2,......我也找不到我的列名和数据。我如何上传这些数据?

1 个答案:

答案 0 :(得分:0)

首先,我创建了一个数据库,但没有在其中创建表。接下来,我使用您的示例文件和您列出的大多数设置尝试导入;我还检查了“文件的第一行包含表列名(如果未选中,第一行将成为数据的一部分)”的框,并使用了双引号"表示“附带的字符:”

Import settings5

它按照我的预期工作:

Import successful

您看到了什么结果?哪个phpMyAdmin版本(我使用最新的4.7.9进行了测试)。