连接数据库 R接入Mysql library(RODBC) conn <- odbcConnect(’’, uid="", pwd="", DBMSencoding=’’) mtool 连接hive import mtool # 导入 hive = mtool.get_hive() python df表进行数据分组 tab.groupby(['judge_col'])['count_col'].count().reset_index()