Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def asarray(a, dtype=None, order=None):
- """Convert the input to an array...
- """
- return array(a, dtype, copy=False, order=order)
- In [10]: t = np.arange(10)
- In [11]: p = pd.DataFrame(t)
- In [12]: t
- Out[12]: array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
- In [13]: p
- Out[13]:
- 0
- 0 0
- 1 1
- 2 2
- 3 3
- 4 4
- 5 5
- 6 6
- 7 7
- 8 8
- 9 9
- In [14]: t[:3] = 4
- In [15]: t
- Out[15]: array([4, 4, 4, 3, 4, 5, 6, 7, 8, 9])
- In [16]: p
- Out[16]:
- 0
- 0 4
- 1 4
- 2 4
- 3 3
- 4 4
- 5 5
- 6 6
- 7 7
- 8 8
- 9 9
Add Comment
Please, Sign In to add comment