Dataframes

Categories: Code Problem / Data Structures and Algorithms / Recursion (32) Code Problem / Data Structures and Algorithms / Binary Search (30) Code Problem / Data Structures and Algorithms / Linked Lists (26) Code Problem / Data Structures and Algorithms / Backtracking (26) Code Problem / Data Structures and Algorithms / Stacks and Queues (25) Code Problem / Data Structures and Algorithms / Hashing (24) Databases / SQL / Backup and Recovery (19) Code Problem / Data Structures and Algorithms / Arrays and Strings (19) Databases / SQL / Database Normalization (18) Code Problem / Data Structures and Algorithms / Time Complexity (17) Databases / SQL / Locking (16) Databases / SQL / Replication (15) Databases / SQL / SQL Queries (13) Code Problem / Data Structures and Algorithms / Graphs (13) Databases / SQL / Database Security (13)  More...

Recent solutions:

Check these solutions from our community:
Python / Data Structures DifficultyMedium Python
To calculate the sum of values in a dataframe column in Python, simply use the sum() function on the column. In the example given, the sum of values in column 'C' would be 24.
About this solution: The candidate's solution is correct and efficient.
Nov 23
Python / Data Structures DifficultyMedium Python
This question is about how to round the values in a dataframe column to the nearest integer. The output should show the rounded values in the column.
About this solution: The candidate's solution is complete and solves the problem. The approach is general and efficient.
Nov 19
Python / Data Structures DifficultyMedium Python
Given a dataframe, find the row with the maximum value in column 'C' and return the values in columns 'A' and 'B' for that row.
About this solution: The candidate's solution is optimal and solves the problem.
Nov 15
Python / Data Structures DifficultyMedium Python
To calculate the percent change in stock prices, we can simply subtract the stock price on the previous day from the stock price on the current day, and divide by the previous day's stock price .
About this solution: The candidate's solution is optimal because it uses the built-in pct_change() function in pandas.
Nov 14
Python / Data Structures DifficultyMedium Python
This technical problem deals with how to keep only certain columns in a dataframe using Python. A function is provided that takes in a dataframe and a list of column names, and returns a new dataframe with only the columns in the list. An example is given of input and output.
About this solution: This solution is complete and solves the problem. The approach is straightforward and easy to follow.
Nov 12