Merging Data Adding Columns To merge two data frames (datasets) horizontally, use the merge function. In most cases, you join two data frames by one or more common key variables (i.e., an inner join). # merge two data frames by ID total <- merge(
两个列表合并为一个字典函数list_dic(list1,list2)可以直接复制拿走 传入的参数为两个列表,list1准备作为key,list2准备作为value,key和value位置一一对应. def list_dic(list1,list2): ''' two lists merge a dict,a list as key,other list as value :param list1:key :param list2:value :return:dict ''' dic = dict