Update dsintro.rst
State: closed

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] Added examples to create DataFrame from series and series with `nan`


Labels:
name: Docs

Comments:
For your review.
There should another method to create DataFrame from numpy series which has no index.
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22781?src=pr&el=h1) Report
> Merging [#22781](https://codecov.io/gh/pandas-dev/pandas/pull/22781?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/1c113db60b68c5a262d64e92dc9de72bfe59aed5?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

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

```diff
@@           Coverage Diff           @@
##           master   #22781   +/-   ##
=======================================
  Coverage   92.17%   92.17%           
=======================================
  Files         169      169           
  Lines       50778    50778           
=======================================
  Hits        46807    46807           
  Misses       3971     3971
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.59% <ø> (ø)` | :arrow_up: |
| #single | `42.33% <ø> (ø)` | :arrow_up: |


------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22781?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/22781?src=pr&el=footer). Last update [1c113db...f0ed68d](https://codecov.io/gh/pandas-dev/pandas/pull/22781?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

Hi,

  x2 is a ndarrays of 5 x 5. When I assign it to df['B'], only the first
column of x2 is included and there is warning whatsoever. Is this feature
documented?

On Fri, Sep 21, 2018 at 5:18 PM Joris Van den Bossche <
notifications@github.com> wrote:

> *@jorisvandenbossche* commented on this pull request.
> ------------------------------
>
> In doc/source/dsintro.rst
> <https://github.com/pandas-dev/pandas/pull/22781#discussion_r219434319>:
>
> >
>  The result will be a DataFrame with the same index as the input Series, and
>  with one column whose name is the original name of the Series (only if no other
>  column name provided).
>
> +.. ipython:: python
> +
> +   df = pd.DataFrame()
> +   df
> +   x1 = pd.Series([1,2,3,4], index=[1,2,3,4])
> +   x1
> +   df['A'] = x1
> +   df
> +   x2 = pd.Series([5,5], index=[1, 3])
> +   x2
> +   df['B'] = x2
>
> There is already a section in this file about adding columns:
> http://pandas.pydata.org/pandas-docs/stable/dsintro.html#column-selection-addition-deletion
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/pandas-dev/pandas/pull/22781#discussion_r219434319>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AEBUtyahcaXZeND2eePntWLOP7yOOXH9ks5udK7jgaJpZM4Wx_rc>
> .
>