You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Allow Stata files to be read incrementally with an iterator; support for long strings in Stata files. See the docs :ref:`here<io.stata_reader>` (:issue:`9493`:).
@@ -273,11 +268,11 @@ The behavior of a small sub-set of edge cases for using ``.loc`` have changed (:
273
268
274
269
.. ipython:: python
275
270
276
-
df = DataFrame(np.random.randn(5,4),
277
-
columns=list('ABCD'),
278
-
index=date_range('20130101',periods=5))
271
+
df =pd.DataFrame(np.random.randn(5,4),
272
+
columns=list('ABCD'),
273
+
index=pd.date_range('20130101',periods=5))
279
274
df
280
-
s = Series(range(5),[-2,-1,1,2,3])
275
+
s =pd.Series(range(5),[-2,-1,1, 2, 3])
281
276
s
282
277
283
278
Previous Behavior
@@ -347,7 +342,7 @@ Previous Behavior
347
342
348
343
.. code-block:: ipython
349
344
350
-
In [3]: s = Series([0,1,2], dtype='category')
345
+
In [3]: s = pd.Series([0, 1, 2], dtype='category')
351
346
352
347
In [4]: s
353
348
Out[4]:
@@ -374,23 +369,23 @@ New Behavior
374
369
375
370
.. ipython:: python
376
371
377
-
s = Series([0,1,2], dtype='category')
372
+
s =pd.Series([0,1, 2], dtype='category')
378
373
s
379
374
s.cat.ordered
380
375
s = s.cat.as_ordered()
381
376
s
382
377
s.cat.ordered
383
378
384
379
# you can set in the constructor of the Categorical
385
-
s = Series(Categorical([0,1,2],ordered=True))
380
+
s =pd.Series(pd.Categorical([0,1, 2],ordered=True))
386
381
s
387
382
s.cat.ordered
388
383
389
384
For ease of creation of series of categorical data, we have added the ability to pass keywords when calling ``.astype()``. These are passed directly to the constructor.
390
385
391
386
.. code-block:: python
392
387
393
-
In [54]: s = Series(["a","b","c","a"]).astype('category',ordered=True)
388
+
In [54]: s =pd.Series(["a","b","c","a"]).astype('category',ordered=True)
394
389
395
390
In [55]: s
396
391
Out[55]:
@@ -401,7 +396,8 @@ For ease of creation of series of categorical data, we have added the ability to
401
396
dtype: category
402
397
Categories (3, object): [a < b < c]
403
398
404
-
In [56]: s = Series(["a","b","c","a"]).astype('category',categories=list('abcdef'),ordered=False)
0 commit comments