Skip to main content

Data Science in Python Interview Questions and Answers




Q1). How can you build a simple logistic regression model in Python?
Q2). How can you train and interpret a linear regression model in SciKit learn?
Q3).Name a few libraries in Python used for Data Analysis and Scientific computations.
Ans1.2.3: NumPy, SciPy, Pandas, SciKit, Matplotlib, Seaborn 
Q4).Which library would you prefer for plotting in Python language: Seaborn or Matplotlib?
Ans4: Matplotlib is the python library used for plotting but it needs lot of fine-tuning to ensure that the plots look shiny. Seaborn helps data scientists create statistically and aesthetically appealing meaningful plots. The answer to this question varies based on the requirements for plotting data. 
Q5).What is the main difference between a Pandas series and a single-column DataFrame in Python?
Q6). Write code to sort a DataFrame in Python in descending order.
Q7). How can you handle duplicate values in a dataset for a variable in Python?
Q8). Which Random Forest parameters can be tuned to enhance the predictive power of the model?
Q9). Which method in pandas.tools.plotting is used to create scatter plot matrix?
Ans5.6.7.8.9: Scatter_matrix 
Q10). How can you check if a data set or time series is Random?
Ans10: To check whether a dataset is random or not use the lag plot. If the lag plot for the given dataset does not show any structure then it is random.

Comments

Post a Comment