I am starting to learn python, numpy and panda, and I have a basic question about sizes.
Refer to the following code blocks:
1. Length: 6, dtype: int64
# create a Series from a dict
pd.Series({key: value for key, value in zip('abcdef', range(6))})
against.
2. Length: 6, dtype: int32
pd.Series(range(6), index=list('abcdef'))
Question
So I think that when you put a list, a numpy array, a dictionary, etc. In pd.Series you will get int64, but when you put only range (6) in pd.Series you will get int32. Can someone please make this a little understandable to me?
Sorry for the simplest question.
@Edit: I am using Pandas version 0.20.1 and Numpy 1.12.1
source
share