@@ -652,9 +652,9 @@ A simple example could be:
652
652
653
653
Examples
654
654
--------
655
- >>> s = pd.Series(['Ant', 'Bear', 'Cow', 'Dog', 'Falcon',
655
+ >>> ser = pd.Series(['Ant', 'Bear', 'Cow', 'Dog', 'Falcon',
656
656
... 'Lion', 'Monkey', 'Rabbit', 'Zebra'])
657
- >>> s .head()
657
+ >>> ser .head()
658
658
0 Ant
659
659
1 Bear
660
660
2 Cow
@@ -664,7 +664,7 @@ A simple example could be:
664
664
665
665
With the ``n`` parameter, we can change the number of returned rows:
666
666
667
- >>> s .head(n=3)
667
+ >>> ser .head(n=3)
668
668
0 Ant
669
669
1 Bear
670
670
2 Cow
@@ -695,10 +695,10 @@ and avoiding aliases. Avoid excessive imports, but if needed, imports from
695
695
the standard library go first, followed by third-party libraries (like
696
696
matplotlib).
697
697
698
- When illustrating examples with a single ``Series `` use the name ``s ``, and if
698
+ When illustrating examples with a single ``Series `` use the name ``ser ``, and if
699
699
illustrating with a single ``DataFrame `` use the name ``df ``. For indices,
700
700
``idx `` is the preferred name. If a set of homogeneous ``Series `` or
701
- ``DataFrame `` is used, name them ``s1 ``, ``s2 ``, ``s3 ``... or ``df1 ``,
701
+ ``DataFrame `` is used, name them ``ser1 ``, ``ser2 ``, ``ser3 ``... or ``df1 ``,
702
702
``df2 ``, ``df3 ``... If the data is not homogeneous, and more than one structure
703
703
is needed, name them with something meaningful, for example ``df_main `` and
704
704
``df_to_join ``.
@@ -731,8 +731,8 @@ positional arguments ``head(3)``.
731
731
732
732
Examples
733
733
--------
734
- >>> s = pd.Series([1, 2, 3])
735
- >>> s .mean()
734
+ >>> ser = pd.Series([1, 2, 3])
735
+ >>> ser .mean()
736
736
2
737
737
"""
738
738
pass
@@ -744,8 +744,8 @@ positional arguments ``head(3)``.
744
744
745
745
Examples
746
746
--------
747
- >>> s = pd.Series([1, np.nan, 3])
748
- >>> s .fillna(0)
747
+ >>> ser = pd.Series([1, np.nan, 3])
748
+ >>> ser .fillna(0)
749
749
[1, 0, 3]
750
750
"""
751
751
pass
@@ -756,10 +756,10 @@ positional arguments ``head(3)``.
756
756
757
757
Examples
758
758
--------
759
- >>> s = pd.Series([380., 370., 24., 26],
759
+ >>> ser = pd.Series([380., 370., 24., 26],
760
760
... name='max_speed',
761
761
... index=['falcon', 'falcon', 'parrot', 'parrot'])
762
- >>> s .groupby_mean()
762
+ >>> ser .groupby_mean()
763
763
index
764
764
falcon 375.0
765
765
parrot 25.0
@@ -776,8 +776,8 @@ positional arguments ``head(3)``.
776
776
777
777
Examples
778
778
--------
779
- >>> s = pd.Series('Antelope', 'Lion', 'Zebra', np.nan)
780
- >>> s .contains(pattern='a')
779
+ >>> ser = pd.Series('Antelope', 'Lion', 'Zebra', np.nan)
780
+ >>> ser .contains(pattern='a')
781
781
0 False
782
782
1 False
783
783
2 True
@@ -800,7 +800,7 @@ positional arguments ``head(3)``.
800
800
801
801
We can fill missing values in the output using the ``na`` parameter:
802
802
803
- >>> s .contains(pattern='a', na=False)
803
+ >>> ser .contains(pattern='a', na=False)
804
804
0 False
805
805
1 False
806
806
2 True
@@ -920,8 +920,8 @@ plot will be generated automatically when building the documentation.
920
920
.. plot::
921
921
:context: close-figs
922
922
923
- >>> s = pd.Series([1, 2, 3])
924
- >>> s .plot()
923
+ >>> ser = pd.Series([1, 2, 3])
924
+ >>> ser .plot()
925
925
"""
926
926
pass
927
927
0 commit comments