JuliaStats/DataFrames.jl — pull request #559 by garborg (2014-03-03 02:13:34+00:00)
Title: Ensure column names are valid identifiers

Automatically coerces names to valid identifiers (NFC, non-reserved identifiers) in `readtable`. Throws an error if user tries to create/rename a column with an invalid identifier elsewhere.

Naming conventions could be a more consistent:
* DataFrames created without names get names `:x1`...`:x[n]`.
* `readtable` columns with empty (or invalid with no valid characters ) names get names `x`, `x_1`...`x_[n-1]`
* `readtable` columns with names starting with an invalid character get an `x` prepended to them
* `readtable` columns with reserved names get and `_` prepended to them

I grabbed reserved identifiers from two spots in `julia-parser.scm` -- not certain that's everything.

I didn't notice a quicker way to assert NFC compliance than `s == normalize_string(s)`, but if there is one, it would be good to use it.

Collateral:
Got rid of references to `{T <: Symbol}` assuming they're vestiges of string indexing days
Couldn't resist deprecating `DataFrame(::Integer, ::Integer)`
Cleared out a couple stray methods in `src/dataframe/dataframe.jl`