Skip to content

Commit 1cb4746

Browse files
authored
Merge pull request #195 from chiraganand/t182_docs
improve documentation, add cross-ref
2 parents e17f2c6 + 55a251c commit 1cb4746

File tree

1 file changed

+25
-7
lines changed

1 file changed

+25
-7
lines changed

Diff for: src/TSFrame.jl

+25-7
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,33 @@
55
66
`::TSFrame` - A type to hold ordered data with an index.
77
8-
A TSFrame object is essentially a `DataFrame` with a specific column marked
9-
as an index. The input `DataFrame` is sorted during construction and
10-
is stored under the property `coredata`. The index is stored in the
11-
`Index` column of `coredata`.
8+
A TSFrame object is essentially a
9+
[DataFrame](https://dataframes.juliadata.org/) with a specific column
10+
marked as an index. The first argument can accept a DataFrame, Vector,
11+
or an Array with 2-dimensions. Any
12+
[Tables.jl](https://github.com/JuliaData/Tables.jl) compatible table
13+
is also accepted as an input.
14+
15+
If the first argument is a `DataFrame` then the DataFrame may contain
16+
an indexing column also. The indexing column can be identified by
17+
providing either the column number or the column name as `String` or
18+
`Symbol` in the DataFrame as the second argument `index`.
19+
20+
In case, an indexing column is not present in the DataFrame then a
21+
sequential index is created automatically.
22+
23+
The input `DataFrame` is sorted during construction and is stored
24+
in the property `coredata`. The index is stored in the column
25+
called `Index` of the `coredata` DataFrame. This index can be fetched
26+
using the [`index()`](@ref) method.
27+
28+
Providing an empty DataFrame to the constructor results in a TSFrame
29+
object with an empty index and no columns. Similarly, providing empty
30+
Vector or empty Array as the first argument results in an empty
31+
TSFrame with no columns.
1232
1333
Permitted data inputs to the constructors are `DataFrame`, `Vector`,
14-
and 2-dimensional `Array`. If an index is already not present in the
15-
constructor then a sequential integer index is created
16-
automatically.
34+
and 2-dimensional `Array`.
1735
1836
`TSFrame(coredata::DataFrame)`: Here, the constructor looks for a column
1937
named `Index` in `coredata` as the index column, if this is not found

0 commit comments

Comments
 (0)