by Suf | Jan 15, 2022 | Machine Learning, Programming, Python, TensorFlow, Tips
A common error you may encounter when using Python is modulenotfounderror: no module named ‘keras’. Keras comes packaged with Tensorflow 2.0 as tensorflow.keras. To import and start using Keras, you need to install TensorFlow 2. You can install TensorFlow...
by Suf | Jan 15, 2022 | Data Science, Programming, Python, Tips
NaN stands for Not a Number. You may encounter the error ValueError: cannot convert float NaN to integer when attempting to convert a column in a Pandas DataFrame from a float to an integer, and the column contains NaN values. You can solve this error by either...
by Suf | Jan 15, 2022 | Programming, Python, Tips
You can create a nested dictionary in Python by placing comma-separated dictionaries within curly braces {}. A Python nested dictionary allows you to store and access data using the key-value mapping structure within an existing dictionary. This tutorial will go...
by Suf | Jan 13, 2022 | Programming, Python, Tips
The easiest way to iterate over a dictionary is to use the in operator with a for loop. For example, for i in dict: print(i) iterate over the keys in the dictionary. We can use square brackets together with the keys to retrieve the values in the dictionary. For...
by Suf | Jan 12, 2022 | Programming, Python, Tips
The easiest way to check if a key exists in a Python dictionary is to use the in operator. This operator evaluates the membership of a value in a dictionary and will evaluate to True if the key exists, otherwise to False. This tutorial will go through the in operator...