I have a CSV file (not normalized, example, real file up to 100 columns):
ID, CUST_NAME, CLIENT_NAME, PAYMENT_NUM, START_DATE, END_DATE
1, CUST1, CLIENT1, 10, 2018-04-01, 2018-04-02
2, CUST1, CLIENT1, 10, 2018-04-01, 2018-05-30
3, CUST1, CLIENT1, 101, 2018-04-02, 2018-04-03
4, CUST2, CLIENT1, 102, 2018-04-02, 2018-04-03
How can I find ALL possible sets of columns which could be used as Primary key.
Desired output:
1) ID
2) PAYMENT_NUM,START_DATE,END_DATE
3) CUST_NAME, CLIENT_NAME, PAYMENT_NUM,START_DATE,END_DATE
I could do it in Java but may be Python/Pandas already provides a quick solution
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…