Hi,
Were the products already in the shop or is it a import of new products ?
The product_code column contains only numbers, so the import system might use these as "product_id" and thus you might end up updating other products with the categories and thus not updating the products you're looking at in your backend.
Also, do you have other columns in the CSV ? If you have the "category_parent" column, it could also be a problem, but it doesn't seem to be the case.
Also, the category in the hikashop_category table of the database needs to be of the type "product". If that's not the case, the system might not found the category based on its ID and thus not link the product with it.
That's all I can think of with the information you provided.