How to mix strings and floats in a NumPy array?
I'd consider a pandas DataFrame instead - the actual data is stored as a numpy array and so supports everything it needs to, and the headers are separate so you don't need to do awkward slicing when working on the whole data set. You can also then index rows and columns by their index. And it supports going to and from CSVs easily.
As an aside, the way to get arrays to accept mixed types is
np.array([1, 'a'], dtype=object)
but obviously you lose practically all of the benefits of using numpy in the first place.
More on reddit.comAlgebraic Datatypes and Pattern Matching in Python
Why is this using lisp naming conventions? There are much more user friendly to call these things.
More on reddit.comWhat is the syntax for declaring a boolean in Python?
In Python, you can assign true and false boolean values to variables to define a boolean. You can also assign an expression that evaluates either of these values.
What is the distinction between tuples and lists of Python?
Lists are mutable, but tuples are not. The implication of iterations in lists consumes time, but it is comparatively faster in tuples. Moreover, lists take up more memory than tuples.