Necessary Pandas Function For Data Analysis

How to get unique values of a column How to exclude columns with ‘object’ datatype from a pandas DataFrame. How to get a list of columns of a certain datatype of a Pandas DataFrame. In this case, the datatype is ‘object’. Get list of columns containing missing data and remove the columns from dataframe.

Solution: Expected 2D array, got scalar array instead

I was trying to fit a basic machine learning model of linear regression. My code was simple. I got the following error. ValueError Traceback (most recent call last) /tmp/ipykernel_10591/ in <module> —-> 1 reg.predict(3300) ~/.local/lib/python3.8/site-packages/sklearn/linear_model/ in predict(self, X) 360 Returns predicted values. 361 “”” –> 362 return self._decision_function(X) 363 364 _preprocess_data = staticmethod(_preprocess_data) ~/.local/lib/python3.8/site-packages/sklearn/linear_model/ in … Read more