diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/source/user_guide/visualization.rst b/doc/source/user_guide/visualization.rst index fdceaa5868cec..9e1b08879b098 100644 --- a/doc/source/user_guide/visualization.rst +++ b/doc/source/user_guide/visualization.rst @@ -1628,3 +1628,19 @@ when plotting a large number of points. :suppress: plt.close('all') + +Examples +~~~~~~~~ + +In order to understand how two variables are correlated, the best fit line +is a good way. You can use ``seaborn.lmplot()`` method that combines ``regplot()`` +and ``FacetGrid`` to plot data and regression model fits across a FacetGrid. + +.. ipython:: python + :suppress: + + import seaborn as sns + df4 = pd.DataFrame({'a': np.random.randn(100) + 1, 'b': np.random.randn(100), + 'c': np.random.randn(100) - 1}, columns=['a', 'b', 'c']) + + sns.lmplot(x="a", y="b", data=df4) diff --git a/pandas/core/series.py b/pandas/core/series.py index c891298d6e499..6ea8f6db60e92 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -4165,12 +4165,10 @@ def rename(self, index=None, **kwargs): """ kwargs["inplace"] = validate_bool_kwarg(kwargs.get("inplace", False), "inplace") - non_mapping = is_scalar(index) or ( - is_list_like(index) and not is_dict_like(index) - ) - if non_mapping: + if callable(index) or is_dict_like(index): + return super().rename(index=index, **kwargs) + else: return self._set_name(index, inplace=kwargs.get("inplace")) - return super().rename(index=index, **kwargs) @Substitution(**_shared_doc_kwargs) @Appender(generic.NDFrame.reindex.__doc__) diff --git a/pandas/io/parquet.py b/pandas/io/parquet.py index 6fc70e9f4a737..86196b50c4726 100644 --- a/pandas/io/parquet.py +++ b/pandas/io/parquet.py @@ -269,6 +269,10 @@ def read_parquet(path, engine="auto", columns=None, **kwargs): expected. A local file could be: ``file://localhost/path/to/table.parquet``. + A file path can also be a directory name that contains multiple(partitioned) + parquet files (in addition to single file path). A directory path could be: + ``directory://usr/path/to/folder``. + If you want to pass in a path object, pandas accepts any ``os.PathLike``.