public static ArrayList<Entry<Integer, String>> getColInfo(String datapath)
			throws IOException {
		BufferedReader br = new BufferedReader(new FileReader(datapath));
		HashMap<Integer,String> ctgs = new HashMap<Integer,String>();//每列的类型
		
		String line = br.readLine();
		int arrcount = line.split(",").length -1;
		
		int count = 0;
		String[] arr;
		
		while(line!=null){
			arr = line.split(",");
			
			for(int i=0;i<arr.length-1;i++){//最后一列为label
				if(!ctgs.containsKey(i)){
					
					if(!arr[i].trim().equals("")){
						String c_ctg;
						
						try {
							Double.parseDouble(arr[i]);
							c_ctg = "N";
							
						} catch (NumberFormatException e) {
//							e.printStackTrace();
							c_ctg = "C";
						}
						
						ctgs.put(i, c_ctg);//number
						count++;
						if(count == arrcount){
							break;
						}
						
					}
				}
			}
			
			if(count == arrcount){
				break;
			}
			line = br.readLine();
		}
		br.close();
		
		ArrayList<Entry<Integer, String>> idinfos = new ArrayList<Entry<Integer, String>>(ctgs.entrySet());
		//排序
		Collections.sort(idinfos, new Comparator<Entry<Integer, String>>() {   
		    public int compare(Map.Entry<Integer, String> o1, Map.Entry<Integer, String> o2) {      
		        return (o1.getKey() - o2.getKey()); 
//		        return (o1.getKey()).toString().compareTo(o2.getKey());
		    }
		});
		return idinfos;
	}