Skip to content

Commit 2d6b3ac

Browse files
committed
Merge branch 'master' of https://github.com/pandas-dev/pandas into over
2 parents 35f15b8 + d43ac97 commit 2d6b3ac

39 files changed

+856
-557
lines changed

doc/source/advanced.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ Finally, as a small note on performance, because the ``take`` method handles
694694
a narrower range of inputs, it can offer performance that is a good deal
695695
faster than fancy indexing.
696696

697-
.. ipython::
697+
.. ipython:: python
698698
699699
arr = np.random.randn(10000, 5)
700700
indexer = np.arange(10000)

doc/source/api.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ Conversion
330330
Series.bool
331331
Series.to_period
332332
Series.to_timestamp
333-
Series.tolist
333+
Series.to_list
334334
Series.get_values
335335

336336

@@ -1541,7 +1541,7 @@ Conversion
15411541
Index.item
15421542
Index.map
15431543
Index.ravel
1544-
Index.tolist
1544+
Index.to_list
15451545
Index.to_native_types
15461546
Index.to_series
15471547
Index.to_frame

doc/source/io.rst

+22
Original file line numberDiff line numberDiff line change
@@ -2596,6 +2596,28 @@ table CSS classes. Note that these classes are *appended* to the existing
25962596
25972597
print(df.to_html(classes=['awesome_table_class', 'even_more_awesome_class']))
25982598
2599+
The ``render_links`` argument provides the ability to add hyperlinks to cells
2600+
that contain URLs.
2601+
2602+
.. versionadded:: 0.24
2603+
2604+
.. ipython:: python
2605+
2606+
url_df = pd.DataFrame({
2607+
'name': ['Python', 'Pandas'],
2608+
'url': ['https://www.python.org/', 'http://pandas.pydata.org']})
2609+
print(url_df.to_html(render_links=True))
2610+
2611+
.. ipython:: python
2612+
:suppress:
2613+
2614+
write_html(url_df, 'render_links', render_links=True)
2615+
2616+
HTML:
2617+
2618+
.. raw:: html
2619+
:file: _static/render_links.html
2620+
25992621
Finally, the ``escape`` argument allows you to control whether the
26002622
"<", ">" and "&" characters escaped in the resulting HTML (by default it is
26012623
``True``). So to get the HTML without escaped characters pass ``escape=False``

doc/source/reshaping.rst

-3
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,6 @@ with the original ``DataFrame``:
575575
dummies = pd.get_dummies(df['key'], prefix='key')
576576
dummies
577577
578-
579578
df[['data1']].join(dummies)
580579
581580
This function is often used along with discretization functions like ``cut``:
@@ -585,10 +584,8 @@ This function is often used along with discretization functions like ``cut``:
585584
values = np.random.randn(10)
586585
values
587586
588-
589587
bins = [0, 0.2, 0.4, 0.6, 0.8, 1]
590588
591-
592589
pd.get_dummies(pd.cut(values, bins))
593590
594591
See also :func:`Series.str.get_dummies <pandas.Series.str.get_dummies>`.

doc/source/timedeltas.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -436,11 +436,11 @@ Finally, the combination of ``TimedeltaIndex`` with ``DatetimeIndex`` allow cert
436436
.. ipython:: python
437437
438438
tdi = pd.TimedeltaIndex(['1 days', pd.NaT, '2 days'])
439-
tdi.tolist()
439+
tdi.to_list()
440440
dti = pd.date_range('20130101', periods=3)
441-
dti.tolist()
442-
(dti + tdi).tolist()
443-
(dti - tdi).tolist()
441+
dti.to_list()
442+
(dti + tdi).to_list()
443+
(dti - tdi).to_list()
444444
445445
Conversions
446446
~~~~~~~~~~~
@@ -461,7 +461,7 @@ Scalars type ops work as well. These can potentially return a *different* type o
461461
462462
# subtraction of a date and a timedelta -> datelike
463463
# note that trying to subtract a date from a Timedelta will raise an exception
464-
(pd.Timestamp('20130101') - tdi).tolist()
464+
(pd.Timestamp('20130101') - tdi).to_list()
465465
466466
# timedelta + timedelta -> timedelta
467467
tdi + pd.Timedelta('10 days')

doc/source/timeseries.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -2338,7 +2338,7 @@ Infer the ambiguous times
23382338
.. ipython:: python
23392339
23402340
rng_hourly_eastern = rng_hourly.tz_localize('US/Eastern', ambiguous='infer')
2341-
rng_hourly_eastern.tolist()
2341+
rng_hourly_eastern.to_list()
23422342
23432343
In addition to 'infer', there are several other arguments supported. Passing
23442344
an array-like of bools or 0s/1s where True represents a DST hour and False a
@@ -2351,8 +2351,8 @@ constructor as well as ``tz_localize``.
23512351
.. ipython:: python
23522352
23532353
rng_hourly_dst = np.array([1, 1, 0, 0, 0])
2354-
rng_hourly.tz_localize('US/Eastern', ambiguous=rng_hourly_dst).tolist()
2355-
rng_hourly.tz_localize('US/Eastern', ambiguous='NaT').tolist()
2354+
rng_hourly.tz_localize('US/Eastern', ambiguous=rng_hourly_dst).to_list()
2355+
rng_hourly.tz_localize('US/Eastern', ambiguous='NaT').to_list()
23562356
23572357
didx = pd.DatetimeIndex(start='2014-08-01 09:00', freq='H',
23582358
periods=10, tz='US/Eastern')

doc/source/whatsnew/v0.17.0.rst

-2
Original file line numberDiff line numberDiff line change
@@ -627,8 +627,6 @@ New Behavior:
627627
In [3]: pd.to_datetime(['2009-07-31', 'asd'])
628628
ValueError: Unknown string format
629629
630-
.. ipython:: python
631-
632630
Of course you can coerce this as well.
633631

634632
.. ipython:: python

0 commit comments

Comments
 (0)