Friday, April 10, 2020

Pandas Interview Questions and Answers


1). Define the Pandas/Python pandas?
Ans:- Pandas is a Python library package that has robust features. It is very fast, flexible, and expressive data structures designed to make working with “relational” or  “labeled” data both easy.
2). Define Series in Pandas?
Ans:- It is a feature that is a one-dimensional labeled array capable of holding data of any type (integer, string, float, python objects, etc.).It is nothing but a column in an excel sheet.
3). Define DataFrame in Pandas?
Ans:  It is a pandas feature which is a 2-dimensional labeled data structure with columns of potentially different types. As an example, it is like a spreadsheet or SQL table, or a dict of Series objects.
4). What are the major features of the pandas Library?
Ans: Follow is the key feature of the panda’s library.
  • Data Alignment
  • Memory Efficient
  • Reshaping
  • Merge and join
  • Time Series
5). What is the name of pandas library tools used to create a scatter plot matrix?
Ans: Scatter_matrix
6). What is pylab?
Ans:  PyLab is a package that contains NumPy, SciPy, and Matplotlib into a single namespace.
7). range ()  vs and xrange () functions in Python?
Ans:  The range() function returns a list but the xrange () function returns an object that works as an iterator for generating numbers on-demand in python.
8). what is the concept of monkey patching?
Ans:  Monkey patching is the programming technique used to modify or extend other codes during runtime. Best practices to use in testing purposes, but not use in a production environment as debugging the code could become difficult.
9). What is the map function in Python?
Ans:  Map function executes the function given as the first argument on all the elements of the iterable given as the second argument. If the function given takes in more than 1 argument, then many iterables are given.
10). Which library is used for Machine Learning in Python?
Ans: SciKit-Learn

11). What is Pandas/Python Pandas?
Ans1: Pandas is a Python package providing fast, flexible, and expressive data structures designed to make working with “relational” or “labeled” data both easy and intuitive. It aims to be the fundamental high-level building block for doing practical, real world data analysis in Python.

12). What is Python pandas used for?
Ans2: pandas is a software library written for the Python programming language for data manipulation and analysis. In particular, it offers data structures and operations for manipulating numerical tables and time series. pandas is free software released under the three-clause BSD license.
 13). What is a pandas DataFrame?
Ans3: DataFrame is a 2-dimensional labeled data structure with columns of potentially different types. You can think of it like a spreadsheet or SQL table, or a dict of Series objects. It is generally the most commonly used pandas object.
14). What is NP Python?
Ans4: NumPy (pronounced /ˈnʌmpaɪ/ (NUM-py) or sometimes /ˈnʌmpi/ (NUM-pee)) is an extension to the Python programming language, adding support for large, multi-dimensional arrays and matrices, along with a large library of high-level mathematical functions to operate on these arrays.
15). What is Matplotlib?
matplotlib is a plotting library for the Python programming language and its numerical mathematics extension NumPy. It provides an object-oriented API for embedding plots into applications using general-purpose GUI toolkits like wxPython, Qt, or GTK+.
16). What can I import from NumPy?
Ans6: numpy is the top package name, and doing 
import numpy doesn’t import submodule numpy.f2py . … The link is established when you do import numpy.f2py. In your above code: import numpy as np # np is an alias pointing tonumpy, but at this point numpy is not linked to numpy.f2py import numpy.
17). What is Scipy?
Ans7: SciPy (pronounced “Sigh Pie”) is open-source software for mathematics, science, and engineering. It is also the name of a very popular conference on scientific programming with Python. The SciPy library depends on NumPy, which provides convenient and fast N-dimensional array manipulation.
18). What is plot ly?
Ans8: Plotly, also known by its URL, Plot.ly, is an online analytics and data visualization tool, headquartered in Montreal, Quebec.
19). What is PIP for Python?
Ans9: pip is a package management system used to install and manage software packages written in Python. Many packages can be found in the Python Package Index (PyPI). Python 2.7.9 and later (on the python2 series), and Python 3.4 and later include pip (pip3 for Python 3) by default.
20). What is Sympy?
Ans10: SymPy is a Python library for symbolic mathematics. It aims to become a full-featured computer algebra system (CAS) while keeping the code as simple as possible in order to be comprehensible and easily extensible.


No comments:

Post a Comment

Short introduction to Pandas -2

In [101]: df = pd.DataFrame({'A': ['one', 'one', 'two', 'three'] * 3,    .....:                ...