HDFC Credit Card Minimum Due

Easy
Arithmetic
Banking
HDFC Bank

HDFC Credit Card Minimum Due

An HDFC-style cards team calculates the minimum amount due on each card.

Return card_id, customer_name, minimum_due, where minimum due is outstanding * min_due_pct / 100, rounded to 2 decimal places. Sort by card_id ascending.

Browser Engine: Evaluates PySpark DataFrame & SQL logic locally in Pyodide WebAssembly.

Input data

1 DataFrame

These DataFrames are passed to solve(spark, dfs). Access one with dfs['name'].

df.cards6 rows
card_id (int)customer_name (string)outstanding (double)min_due_pct (double)
1Aarav240005
2Bela80005
3Chen5600010
4Dia150005
5Eli1200002
6Fay32005

Return these columns

card_id(bigint)
customer_name(string)
minimum_due(double)

Column names and order must match. Sort order is specified in the question.

Browser engine
Loading Python editor…
Click Run to try the sample cases, or Submit to check the hidden cases. First run caches the browser Python engine (~8–15s once); all code stays on your device.