You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cool library. I got stopped pretty quick though as I wanted to drop the last column of a df by index. It looks like Drop is column header string only?
Is there a hack for this, like Drop(df.getcolname(df.ColCount)) ? If not, it kind of looks easy enough to add in the source that I could add that function, however, then I end up with a custom version and I'd rather not. I don't see a way to get a column name. From describe maybe? I'm guessing I'm missing something simple! Thanks.
///
/// Removes specified columns from the data frame.
///
/// List of column names to be removed.
///
public DataFrame Drop(params string[] colName)
{
//
var cols = new List<(string oldName, string newName)>();
foreach (var c in this.Columns)
{
if (colName.Contains(c))
continue;
cols.Add((c, null));
}
return Create(cols.ToArray());
}
The text was updated successfully, but these errors were encountered:
Cool library. I got stopped pretty quick though as I wanted to drop the last column of a df by index. It looks like Drop is column header string only?
Is there a hack for this, like Drop(df.getcolname(df.ColCount)) ? If not, it kind of looks easy enough to add in the source that I could add that function, however, then I end up with a custom version and I'd rather not. I don't see a way to get a column name. From describe maybe? I'm guessing I'm missing something simple! Thanks.
///
/// Removes specified columns from the data frame.
///
/// List of column names to be removed.
///
public DataFrame Drop(params string[] colName)
{
//
var cols = new List<(string oldName, string newName)>();
foreach (var c in this.Columns)
{
if (colName.Contains(c))
continue;
cols.Add((c, null));
}
The text was updated successfully, but these errors were encountered: