Create a DataFrame from List
A easy-tier problem at 81% community acceptance, tagged with . Reported in interviews at Infosys and 1 others.
Create a DataFrame from List is the kind of problem that looks trivial until it isn't. You'll see it in assessments from Google and Infosys, and at 81% acceptance it should be a gimme. But that's exactly when candidates mess it up, rushing through the setup and hitting runtime errors on edge cases they didn't think to check. If you blank on the pandas syntax or the shape of your input data during a live OA, StealthCoder surfaces the working solution in seconds while the proctor watches your screen. This is your safety net for the one DataFrame problem you didn't drill.
Companies that ask "Create a DataFrame from List"
Create a DataFrame from List is the kind of problem that decides whether you pass. StealthCoder reads the problem on screen and surfaces a working solution in under 2 seconds. Invisible to screen share. The proctor sees nothing. Made by an Amazon engineer who watched the leaked-problem repo become an industry secret. He decided you should have it too.
Get StealthCoderThe trick here is understanding how pandas ingests raw data and what shape it expects. Most candidates know df = pd.DataFrame(data) but fumble on how to handle row vs. column orientation, missing axis parameters, or index setup. The gotcha is usually a list of lists where you need to specify axis=0 or axis=1, or a simple list where the output isn't what you visually expected. With 80% acceptance, the problem rewards clean fundamentals: knowing when to pass a dict of lists, a list of dicts, a 2D list, or a Series. StealthCoder is the hedge if you hit this live and your first attempt doesn't match the expected output shape.
You know the problem.
Make sure you actually pass it.
Create a DataFrame from List recycles across companies for a reason. It's easy-tier, and most candidates blank under the timer. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds. Made by an Amazon engineer who watched the leaked-problem repo become an industry secret. He decided you should have it too. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Create a DataFrame from List interview FAQ
Is this problem actually as easy as the label says?+
Yes, but 'easy' means short, not necessarily obvious. The 81% acceptance reflects that most people who see it know pandas basics. The trap is misreading the input format and building the wrong shape DataFrame. Get the input right and you're done in under two minutes.
Do Google and Infosys really ask this in live OAs?+
Yes. Both companies include it in their assessments. It's a filter for whether you can read pandas docs and construct data structures correctly under pressure, not a trick problem. It screens for baseline competence, not brilliance.
What's the most common mistake candidates make?+
Assuming the input is always a 2D list and not checking if it's a list of dicts, a dict of lists, or a single flat list. Second mistake is not paying attention to index or column labeling. Read the problem spec carefully on input format first.
How does this relate to real pandas work?+
Directly. In production you'll load data from CSV or JSON, but you also build DataFrames from Python objects in memory. This problem tests that you know the constructor's quirks so you can debug fast when your shape is wrong.
Should I memorize pandas DataFrame constructor signatures?+
No. Understand the three main input patterns: list of lists (2D), list of dicts (each dict is a row), dict of lists (each list is a column). Know that index and columns are optional. That covers 90% of real scenarios and this problem.
Want the actual problem statement? View "Create a DataFrame from List" on LeetCode →