How to Check the Version of Numpy Installed

You can run the following code in order to check the version of Numpy installed in Python: import numpy print(numpy.version.version) Here is how the code would look like in Python: Run the code, and you’ll get the version of Numpy. In my case, the version of Numpy installed is 1.18.1:

Fastest way to Convert Integers to Strings in Pandas DataFrame

In this article, we’ll look into the fastest way to convert integers to strings in Pandas DataFrame. The approaches that will be measured are: (1) map(str) df[‘DataFrame Column’] = df[‘DataFrame Column’].map(str) (2) apply(str) df[‘DataFrame Column’] = df[‘DataFrame Column’].apply(str) (3) astype(str) df[‘DataFrame Column’] = df[‘DataFrame Column’].astype(str) (4) values.astype(str) df[‘DataFrame Column’] = df[‘DataFrame Column’].values.astype(str) The Experiment For …

Fastest way to Convert Integers to Strings in Pandas DataFrame Read More »

Check for NaN in Pandas DataFrame (examples included)

Here are 4 ways to check for NaN in Pandas DataFrame: (1) Check for NaN under a single DataFrame column: df[‘your column name’].isnull().values.any() (2) Count the NaN under a single DataFrame column: df[‘your column name’].isnull().sum() (3) Check for NaN under an entire DataFrame: df.isnull().values.any() (4) Count the NaN under an entire DataFrame: df.isnull().sum().sum() Examples of …

Check for NaN in Pandas DataFrame (examples included) Read More »