Skip to content

Commit

Permalink
Improve docstring of DataFrame
Browse files Browse the repository at this point in the history
Fixes #2361
  • Loading branch information
bkamins committed Oct 1, 2020
1 parent 11a9949 commit 6c8f26a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/dataframe/dataframe.jl
Expand Up @@ -23,6 +23,8 @@ DataFrame(kwargs...)
DataFrame(pairs::Pair{Symbol,<:Any}...; makeunique::Bool=false, copycols::Bool=true)
DataFrame(pairs::Pair{<:AbstractString,<:Any}...; makeunique::Bool=false,
copycols::Bool=true)
DataFrame(pairs::AbstractVector{<:Pair}; makeunique::Bool=false, copycols::Bool=true)
DataFrame(pairs::NTuple{N, Pair}; makeunique::Bool=false, copycols::Bool=true) where {N}
DataFrame() # an empty DataFrame
DataFrame(column_eltypes::AbstractVector, names::AbstractVector{Symbol},
nrows::Integer=0; makeunique::Bool=false)
Expand Down Expand Up @@ -51,14 +53,14 @@ DataFrame(::GroupedDataFrame; keepkeys::Bool=true)
to `CategoricalVector`
- `ds` : `AbstractDict` of columns
- `table` : any type that implements the
[Tables.jl](https://github.com/JuliaData/Tables.jl) interface; in particular
a tuple or vector of `Pair{Symbol, <:AbstractVector}}` objects is a table.
[Tables.jl](https://github.com/JuliaData/Tables.jl) interface
- `copycols` : whether vectors passed as columns should be copied; if set
to `false` then the constructor will still copy the passed columns
if it is not possible to construct a `DataFrame` without materializing new columns.
All columns in `columns` must be `AbstractVector`s and have the same length. An
exception are `DataFrame(kwargs...)` and `DataFrame(pairs::Pair...)` form
exception are `DataFrame(kwargs...)`, `DataFrame(pairs::Pair...)`,
DataFrame(pairs::AbstractVector{<:Pair}, and DataFrame(pairs::NTuple{N, Pair} form
constructors which additionally allow a column to be of any other type that is
not an `AbstractArray`, in which case the passed value is automatically repeated
to fill a new vector of the appropriate length. As a particular rule values
Expand Down

0 comments on commit 6c8f26a

Please sign in to comment.