Pandas Dataframe with User Level Inputs

share link

by Abdul Rawoof A R dot icon Updated: Mar 1, 2023

technology logo
technology logo

Solution Kit Solution Kit  

We can use the input() function in Python to ask the user for input or information. As a parameter, we can input the text we want to display to the user, and then once the user presses "enter", the input value is returned. Then we can store user input in a variable to use the information in our program or application. 


The input() function: 

  • To get Python user input from the keyboard, use the input() function. 
  • After entering the value, press the enter key. 
  • There is no timeout for the user input, and the program waits for user input indefinitely. 
  • This function returns a string that we can store in a variable. 


  • Pandas: It is an open-source library in Python, providing ready-to-use high-performance data structures and data analysis tools. This module runs on top of NumPy, and it is most popularly used for data science and data analytics. 
  • NumPy: It is a Python library for working in linear algebra, matrices, and Fourier transform. 


Here is an example of how to get user input in Pandas DataFrame: