I would like to know if there is a way to get the shape and the type of any variable in Python. In the IDE Spyder, there is a variable explorer that lists this information for all types of objects (numpy arrays, pandas dataframes, lists etc.) as you can see on this picture:
With shape and type I am referring to what you can actually see on the "Type" and "Size" column of Spyder.
I know that there are specific calls for the individual objects (like numpy and pandas) but I would like to know if there is also a way to get this information for any object type as it is done in Spyder. The solution mentioned here How do I determine the size of an object in Python? just gives the size of any object but not the shape that also includes information about the dimensionality.