How do I prepare data in which each output row depends on multiple input rows?

My goal is to predict the value of Y based on multiple values of X1 and X2 for each observation of Y.

In my example, I want to predict whether a customer will file for bankruptcy (table 1) based on limits and balances of their credit cards (table 2). The challenge is that customer 1 has two credit cards, whereas customer 2 has one credit card.

How do I map table 2 to table 1 in this scenario?

(Of course I can create summary statistics, but I do not want to bias the model.)

Table 1: Bankruptcy filing

customerId | Customer filed for bankruptcy (Y)
1            1
2            0


Table 2: Customer credit cards

customerId | creditCardId | Credit limit (X1) | Credit used (X2)
1            1              5                   5
1            2              9                   8
2            1              10                  1

• This seems like a simple problem. If you create enough summary statistics you will be able to describe the input space closely enough. This should not be an issue. – oW_ Nov 1 '18 at 20:02
• I don't want to impose any functional form, that's what I mean by 'I don't want to bias the model'. – Erik Nov 1 '18 at 20:20
• you wouldn't do that by computing summary statistics (per customerId), your functional form is not determined by the input features – oW_ Nov 1 '18 at 22:20