by Suf | Mar 30, 2022 | Programming, Python, Tips
In Python, a Pandas Series is a one-dimensional labelled array capable of holding data of any type. Pandas Series is the same as a column in an Excel spreadsheet. You cannot reshape a Pandas Series using pandas.Series.reshape. This method has been deprecated since...
by Suf | Mar 29, 2022 | Programming, Python, Tips
If you try to call contains() on a string like string.contains(value) you will raise the AttributeError: ‘str’ object has no attribute ‘contains’. The contains() belongs to the pandas.Series class. You can call str.contains on a Series object....
by Suf | Mar 29, 2022 | Programming, Python, Tips
In Python, the built-in repr() function returns a string containing a printable representation of an object. For a class object, repr() returns a string enclosed in angle brackets <> containing the name and address of the object by default This tutorial will go...
by Suf | Mar 27, 2022 | Programming, Python, Tips
In TensorFlow 2.0, tf.GraphDef is no longer in use. TensorFlow 2.0 encapsulates graph computations as Python functions instead of using Session making TensorFlow more Pythonic. If you want to continue using GraphDef in TensorFlow 2.0, use tf.compat.v1.Graphdef()...
by Suf | Mar 26, 2022 | Machine Learning, Programming, Python, Tips
TensorFlow 2 has integrated deep-learning Keras API as tensorflow.keras. If you try to import from the standalone Keras API with a Tensorflow 2 installed on your system, this can raise incompatibility issues, and you may raise the AttributeError: module...
by Suf | Mar 26, 2022 | Programming, Python, Tips
In TensorFlow 2.0, tf.placeholder is no longer in use. A placeholder is a variable that we will assign data to at a later point. It allows us to create operations and build the computation graph without the data. In TensorFlow 2.0, we can use tf.function to execute...