Innerjoin of two tables

조회 수: 2 (최근 30일)
Dion Theunissen
Dion Theunissen 2022년 2월 3일
답변: Nitin Khola 2022년 2월 3일
I try to combine two tables based on the PartitionKey.
Actually it is not working on the way im trying now:
% Import the data
UserData = readtable("/Users/apployee/Documents/Dion/SV/UserData.csv", opts);
% Import the data
User = readtable("/Users/apployee/Documents/Dion/SV/User.csv", opts);
new = innerjoin(User,UserData,'PartitionKey');
Both tables contains in the first column the PartitionKey which is in both tables the same.

답변 (1개)

Nitin Khola
Nitin Khola 2022년 2월 3일
Hi,
If "PartitionKey" is the only variable in common, you can simple use the two tables as inputs and it will use this common variable by default.
innerjoin(User,UserData)
If you want to specify keys, you must pass in as name-value pair arguments. The following doc link explains one such argument, there are more below it:

카테고리

Help CenterFile Exchange에서 Tables에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by