cswork / OA打开练习工作台

StripeOA #5

Cuisine Count (Pandas)

估计简单非算法题评测数据准备中,可先阅读题面

考点(AI 标注)字符串哈希计数

Dataframe df with columns restaurant_id, location_code, cuisines (space-separated lowercase strings):

  1. Drop restaurants offering fewer than 3 cuisines.
  2. Strip location_code to alphanumeric characters only.
  3. For each cleaned location, count how many restaurants offer each of italian, chinese, indian, mexican (one column per cuisine).

Output sorted by location_code ascending.