-
Notifications
You must be signed in to change notification settings - Fork 372
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BREAKING] Add column indexing using strings
User visible changes: * allow using an AbstractString everywhere where Symbol was accepted as a column indicator (i.e. this extends beyond just getindex and getproperty, every function was reviewed and made consistent) * docstrings were updated to reflect this change + some unrelated docs fixes were added where spotted * names function consistently returns vector of strings for all types that return column names * propertynames function consistently returns vector of Symbols for all types that return column names * keys function consistently returns vector of Symbols for all types that return column names as keys * depend on DataAPI.jl v1.2 * rename! passes String to a function if API with function is used * consistently define hasproperty for types that have custom getproperty * add cols to names function for types where it makes sense consistently * push! accepts dicts with string keys * indexing with an arbitrary eltype vector now throws better error messages (informtive ArgumentErroris thrown in more cases rather thanMethodError` in the past) Internal changes: * add definitions of SymbolOrString, ColumnIndex (updated), and MultiColumnIndex unions and use them consistently across whole codebase * remove keys from AbstractIndex as it was never used * correct formatting of code in many places (mainly docstrings, function signatures, and adding missing return statements in long functions as many of them were updated anyway, but also in unrelated places) * fix a rule that _names returns vector of Symbols without copying * in some places switch from names to _names internally to avoid unnecessary allocations * in some places use groupcols where this function would be an appropriate to call; similarly with names(df, cols) where it made sense * remove without function that was not needed anymore Co-authored-by: Milan Bouchet-Valat <[email protected]> Co-authored-by: pdeffebach <[email protected]>
- Loading branch information
1 parent
ccde40a
commit b1f675d
Showing
42 changed files
with
2,709 additions
and
1,069 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,6 +109,7 @@ without caution because: | |
|
||
```@docs | ||
AbstractDataFrame | ||
AsTable | ||
ByRow | ||
DataFrame | ||
DataFrameRow | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.