DOC: Improved the docstring of pandas.DataFrame.values
State: closed

- [ ] closes #xxxx
- [ ] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

```
################################################################################
############ Docstring (pandas.pandas.core.generic.NDFrame.values)  ############
################################################################################

Generate and return a Numpy representation of NDFrame.

Only the values in the NDFrame will be returned, the axes labels will
be removed.

Returns
-------
numpy.ndarray
    The values of the NDFrame

Examples
--------
>>> df = pd.DataFrame([('falcon', 'bird',    389.0),
...                    ('parrot', 'bird',     24.0),
...                    ('lion',   'mammal',   80.5),
...                    ('monkey', 'mammal', np.nan)],
...                   columns=('name', 'class', 'max_speed'))
>>> df
     name   class  max_speed
0  falcon    bird      389.0
1  parrot    bird       24.0
2    lion  mammal       80.5
3  monkey  mammal        NaN
>>> df.values
array([['falcon', 'bird', 389.0],
       ['parrot', 'bird', 24.0],
       ['lion', 'mammal', 80.5],
       ['monkey', 'mammal', nan]], dtype=object)

Notes
-----
The dtype will be a lower-common-denominator dtype (implicit
upcasting); that is to say if the dtypes (even of numeric types)
are mixed, the one that accommodates all will be chosen. Use this
with care if you are not dealing with the blocks.

e.g. If the dtypes are float16 and float32, dtype will be upcast to
float32.  If dtypes are int32 and uint8, dtype will be upcast to
int32. By numpy.find_common_type convention, mixing int64 and uint64
will result in a flot64 dtype.

################################################################################
################################## Validation ##################################
################################################################################

Errors found:
        Private classes (['NDFrame']) should not be mentioned in public docstring.
        See Also section not found
```

Labels:
name: Docs

Comments:
The original docstring contained the private class "NDFrame", so I kept it in there despite failing the docstring test.

Docstring assigned to the Linz chapter for the sprint.
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/20065?src=pr&el=h1) Report
> Merging [#20065](https://codecov.io/gh/pandas-dev/pandas/pull/20065?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/1d73cf33b4ac5feac9adc3feab0e13518dd0d154?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/20065/graphs/tree.svg?height=150&width=650&token=eZ4WkYLtcO&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/20065?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #20065      +/-   ##
==========================================
- Coverage   91.69%   91.69%   -0.01%     
==========================================
  Files         150      150              
  Lines       49112    49122      +10     
==========================================
+ Hits        45035    45043       +8     
- Misses       4077     4079       +2
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.07% <ø> (-0.01%)` | :arrow_down: |
| #single | `41.86% <ø> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/20065?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/20065/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `95.84% <ø> (ø)` | :arrow_up: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/20065/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `83.64% <0%> (-0.21%)` | :arrow_down: |
| [pandas/core/indexes/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/20065/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9iYXNlLnB5) | `96.66% <0%> (ø)` | :arrow_up: |
| [pandas/core/window.py](https://codecov.io/gh/pandas-dev/pandas/pull/20065/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvd2luZG93LnB5) | `96.31% <0%> (ø)` | :arrow_up: |
| [pandas/core/reshape/tile.py](https://codecov.io/gh/pandas-dev/pandas/pull/20065/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzaGFwZS90aWxlLnB5) | `93.37% <0%> (+0.42%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/20065?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/20065?src=pr&el=footer). Last update [1d73cf3...ca17a15](https://codecov.io/gh/pandas-dev/pandas/pull/20065?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

Hello @math-and-data! Thanks for updating the PR.



Cheers ! There are no PEP8 issues in this Pull Request. :beers: 

##### Comment last updated on March 10, 2018 at 14:40 Hours UTC
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

################################################################################
############ Docstring (pandas.pandas.core.generic.NDFrame.values)  ############
################################################################################

Return a Numpy representation of the DataFrame.

Only the values in the DataFrame will be returned, the axes labels
will be removed.

Returns
-------
numpy.ndarray
    The values of the DataFrame

Examples
--------
A DataFrame where all columns are the same type (e.g., int64) results
in an ndarray of the same type.

>>> df = pd.DataFrame({'age':    [ 3,  29],
...                    'height': [94, 170],
...                    'weight': [31, 115]})
>>> df
   age  height  weight
0    3      94      31
1   29     170     115
>>> df.values
array([[  3,  94,  31],
       [ 29, 170, 115]], dtype=int64)

A DataFrame with mixed type columns(e.g., str/object, int64, float32)
results in an ndarray of the broadest type encompasing these mixed
types (e.g., object).

>>> df2 = pd.DataFrame([('parrot',   24.0, 'second'),
...                     ('lion',     80.5, 1),
...                     ('monkey', np.nan, None)],
...                   columns=('name', 'max_speed', 'rank'))
>>> df2.dtypes
name          object
max_speed    float64
rank          object
dtype: object
>>> df2.values
array([['parrot', 24.0, 'second'],
       ['lion', 80.5, 1],
       ['monkey', nan, None]], dtype=object)

Notes
-----
The dtype will be a lower-common-denominator dtype (implicit
upcasting); that is to say if the dtypes (even of numeric types)
are mixed, the one that accommodates all will be chosen. Use this
with care if you are not dealing with the blocks.

e.g. If the dtypes are float16 and float32, dtype will be upcast to
float32.  If dtypes are int32 and uint8, dtype will be upcast to
int32. By :func:`numpy.find_common_type` convention, mixing int64
and uint64 will result in a float64 dtype.

See Also
--------
pandas.DataFrame.from_records : Creating a DataFrame from a numpy.ndarray
pandas.DataFrame.keys : Retrieving the 'info axis' (column names)
pandas.DataFrame.columns : Retrieving the column names

################################################################################
################################## Validation ##################################
################################################################################

Docstring for "pandas.pandas.core.generic.NDFrame.values" correct. :)
```
################################################################################
############ Docstring (pandas.pandas.core.generic.NDFrame.values)  ############
################################################################################

Return a Numpy representation of the DataFrame.

Only the values in the DataFrame will be returned, the axes labels
will be removed.

Returns
-------
numpy.ndarray
    The values of the DataFrame

Examples
--------
A DataFrame where all columns are the same type (e.g., int64) results
in an array of the same type.

>>> df = pd.DataFrame({'age':    [ 3,  29],
...                    'height': [94, 170],
...                    'weight': [31, 115]})
>>> df
   age  height  weight
0    3      94      31
1   29     170     115
>>> df.dtypes
age       int64
height    int64
weight    int64
dtype: object
>>> df.values
array([[  3,  94,  31],
       [ 29, 170, 115]], dtype=int64)

A DataFrame with mixed type columns(e.g., str/object, int64, float32)
results in an ndarray of the broadest type that accommodates these
mixed types (e.g., object).

>>> df2 = pd.DataFrame([('parrot',   24.0, 'second'),
...                     ('lion',     80.5, 1),
...                     ('monkey', np.nan, None)],
...                   columns=('name', 'max_speed', 'rank'))
>>> df2.dtypes
name          object
max_speed    float64
rank          object
dtype: object
>>> df2.values
array([['parrot', 24.0, 'second'],
       ['lion', 80.5, 1],
       ['monkey', nan, None]], dtype=object)

Notes
-----
The dtype will be a lower-common-denominator dtype (implicit
upcasting); that is to say if the dtypes (even of numeric types)
are mixed, the one that accommodates all will be chosen. Use this
with care if you are not dealing with the blocks.

e.g. If the dtypes are float16 and float32, dtype will be upcast to
float32.  If dtypes are int32 and uint8, dtype will be upcast to
int32. By :func:`numpy.find_common_type` convention, mixing int64
and uint64 will result in a float64 dtype.

See Also
--------
pandas.DataFrame.from_records : Inverse operation; creating a
    DataFrame from an ndarray
pandas.DataFrame.keys : Retrieving the 'info axis' (column names)
pandas.DataFrame.columns : Retrieving the column names

################################################################################
################################## Validation ##################################
################################################################################

Docstring for "pandas.pandas.core.generic.NDFrame.values" correct. :)
```
lgtm.
Thanks @math-and-data !
I just removed `from_records`, as you cannot use this to get a dataframe back from .values