public static void writeInLine(Map<Integer, List<MeanRating>> ratings, String fileName) {
		try {
			PrintWriter writer = new PrintWriter(fileName, "UTF-8");

			for (int movieId : ratings.keySet()) {
				writer.print(movieId);
				for (MeanRating rating : ratings.get(movieId)) {
					writer.print(",");
					writer.print(rating.getItemName());
					writer.print(",");
					writer.print(rating.getMeanData());
				}
				writer.println();
			}

			writer.close();

		} catch (Exception e) {
			System.out.println(e.getMessage());
		}
	}