Danfo.js
  • Danfo.js Documentation
  • Getting Started
  • API reference
    • General Functions
      • danfo.tensorflow
      • danfo. convertFunctionTotransformer
      • danfo.streamCsvTransformer
      • danfo.streamJSON
      • danfo.streamCSV
      • danfo.Utils
      • danfo.Str
      • danfo.Dt
      • danfo.dateRange
      • danfo.OneHotEncoder
      • danfo.StandardScaler
      • danfo.MinMaxScaler
      • danfo.LabelEncoder
      • danfo.toDateTime
      • danfo.getDummies
      • danfo.concat
      • danfo.merge
    • Input/Output
      • danfo.readExcel
      • danfo.toExcel
      • danfo.readJSON
      • danfo.toJSON
      • danfo.readCSV
      • danfo.toCSV
    • Series
      • Creating a Series
      • Series.append
      • Series.cumSum
      • Series.cumMax
      • Series.cumProd
      • Series.cumMin
      • Series.str.split
      • Series.str.len
      • Series.str.join
      • Series.str.trim
      • Series.str.substring
      • Series.str.substr
      • Series.str.slice
      • Series.str.search
      • Series.str.repeat
      • Series.str.replace
      • Series.str.lastIndexOf
      • Series.str.indexOf
      • Series.str.includes
      • Series.str.endsWith
      • Series.str.startsWith
      • Series.str.concat
      • Series.str.charAt
      • Series.str.toUpperCase
      • Series.str.toLowerCase
      • Series.str.capitalize
      • Series.dt.seconds
      • Series.dt.minutes
      • Series.dt.dayOfMonth
      • Series.dt.monthName
      • Series.dt.hours
      • Series.dt.dayOfWeek
      • Series.dt.dayOfWeek
      • Series.dt.month
      • Series.dt.year
      • Series.argMax
      • Series.argMin
      • Series.argSort
      • Series.replace
      • Series.isNa
      • Series.fillNa
      • Series.dropNa
      • Series.dropDuplicates
      • Series.valueCounts
      • Series.nUnique
      • Series.unique
      • Series.abs
      • Series.ne
      • Series.eq
      • Series.ge
      • Series.le
      • Series.gt
      • Series.lt
      • Series.iloc
      • Series.loc
      • Series.at
      • Series.iat
      • Series.ndim
      • Series.shape
      • Series.dtype
      • Series.values
      • Series.tensor
      • Series.index
      • Series.apply
      • Series.map
      • Series.setIndex
      • Series.resetIndex
      • Series.describe
      • Series.copy
      • Series.sortValues
      • Series.var
      • Series.std
      • Series.round
      • Series.minimum
      • Series.maximum
      • Series.count
      • Series.sum
      • Series.max
      • Series.min
      • Series.mode
      • Series.median
      • Series.mean
      • Series.mod
      • Series.pow
      • Series.div
      • Series.mul
      • Series.sub
      • Series.add
      • Series.sample
      • Series.tail
      • Series.head
      • Series.and
      • Series.or
    • Dataframe
      • Creating a DataFrame
      • DataFrame.sortIndex
      • DataFrame.append
      • DataFrame.nUnique
      • DataFrame.tensor
      • DataFrame.print
      • DataFrame.toCSV
      • DataFrame.toJSON
      • DataFrame.toExcel
      • DataFrame.sortValues
      • DataFrame.setIndex
      • DataFrame.resetIndex
      • DataFrame.rename
      • DataFrame.drop
      • DataFrame.asType
      • DataFrame.shape
      • DataFrame.axis
      • DataFrame.ndim
      • DataFrame.values
      • DataFrame.selectDtypes
      • DataFrame.ctypes
      • DataFrame.index
      • DataFrame.loc
      • DataFrame.iloc
      • DataFrame.at
      • DataFrame.iat
      • DataFrame.head
      • DataFrame.tail
      • DataFrame.sample
      • DataFrame.add
      • DataFrame.sub
      • DataFrame.mul
      • DataFrame.div
      • DataFrame.pow
      • DataFrame.mod
      • DataFrame.mean
      • DataFrame.median
      • DataFrame.min
      • DataFrame.max
      • DataFrame.std
      • DataFrame.var
      • DataFrame.count
      • DataFrame.round
      • DataFrame.cumSum
      • DataFrame.cumMin
      • DataFrame.cumMax
      • DataFrame.cumProd
      • DataFrame.copy
      • DataFrame.describe
      • DataFrame.sum
      • DataFrame.abs
      • DataFrame.query
      • DataFrame.addColumn
      • DataFrame.groupby
      • DataFrame.column
      • DataFrame.fillNa
      • DataFrame.isNa
      • DataFrame.dropNa
      • DataFrame.apply
      • DataFrame.applyMap
      • DataFrame.It
      • DataFrame.gt
      • DataFrame.le
      • DataFrame.ge
      • DataFrame.ne
      • DataFrame.eq
      • DataFrame.replace
    • Configuration Options
    • Plotting
      • Timeseries Plots
      • Violin Plots
      • Box Plots
      • Tables
      • Pie Charts
      • Histograms
      • Scatter Plots
      • Bar Charts
      • Line Charts
      • Customizing your plots
    • Groupby
      • Groupby.getGroups
      • Groupby.col
      • Groupby.max
      • Groupby.min
      • Groupby.sum
      • Groupby.mean
      • Groupby.std
      • Groupby.var
      • Groupby.count
      • Groupby.cumSum
      • Groupby.cumMax
      • Groupby.cumMin
      • Groupby.cumProd
      • Groupby.agg
  • User Guides
    • Migrating to the stable version of Danfo.js
    • Using Danfojs in React
    • Titanic Survival Prediction using Danfo.js and Tensorflow.js
  • Building Data Driven Applications with Danfo.js - Book
  • Contributing Guide
  • Release Notes
Powered by GitBook
On this page
  • Attributes
  • Conversion
  • Indexing, iteration
  • Binary operator functions
  • Function application & GroupBy
  • Computations / descriptive stats
  • Reindexing / selection / label manipulation
  • Missing data handling
  • Sorting & transposing
  • Combining / comparing / joining / merging
  • Plotting
  • Serialization / IO / conversion

Was this helpful?

  1. API reference

Dataframe

Two-dimensional, size-mutable, potentially heterogeneous tabular data.

Attributes

The index (row labels) of the DataFrame.

The column labels of the DataFrame.

Conversion

Cast a pandas object to a specified dtype dtype.

Make a copy of this object’s indices and data.

Indexing, iteration

Return the first n rows

Access a group of rows and columns by label(s) or a boolean array.

Purely integer-location based indexing for selection by position.

Return the last n rows.

Query the columns of a DataFrame with a boolean expression.

Binary operator functions

Get Addition of dataframe and other, element-wise (binary operator add).

Get Subtraction of dataframe and other, element-wise (binary operator sub).

Get Multiplication of dataframe and other, element-wise (binary operator mul).

Get Floating division of dataframe and other, element-wise (binary operator truediv).

Get Modulo of dataframe and other, element-wise (binary operator mod).

Get Exponential power of dataframe and other, element-wise (binary operator pow).

Get Less than of dataframe and other, element-wise (binary operator lt).

Get Greater than of dataframe and other, element-wise (binary operator gt).

Get Less than or equal to of dataframe and other, element-wise (binary operator le).

Get Greater than or equal to of dataframe and other, element-wise (binary operator ge).

Get Not equal to of dataframe and other, element-wise (binary operator ne).

Get Equal to of dataframe and other, element-wise (binary operator eq).

Function application & GroupBy

Apply a function along an axis of the DataFrame.

Group DataFrame using a mapper or by a Series of columns.

Map a function on Object along an axis to DataFrame

Computations / descriptive stats

Return a Series/DataFrame with absolute numeric value of each element.

Compute pairwise correlation of columns, excluding NA/null values.

Count non-NAN cells for each column or row.

Return cumulative maximum over a DataFrame or Series axis.

Return cumulative minimum over a DataFrame or Series axis.

Return cumulative product over a DataFrame or Series axis.

Return cumulative sum over a DataFrame or Series axis.

Generate descriptive statistics.

Return the maximum of the values for the requested axis.

Return the mean of the values for the requested axis.

Return the median of the values for the requested axis.

Return the minimum of the values for the requested axis.

Get the mode(s) of each element along the selected axis.

Round a DataFrame to a variable number of decimal places.

Return the sum of the values for the requested axis.

Return sample standard deviation over requested axis.

Return unbiased variance over requested axis.

Count distinct observations over requested axis.

Reindexing / selection / label manipulation

Drop specified labels from rows or columns.

Return the first n rows.

Alter axes labels.

Reset the index of a DataFrame

Return a random sample of items from an axis of object.

Set the DataFrame index using existing columns.

Return the last n rows.

Missing data handling

Remove missing values.

Fill NaN values with specified values

Detect missing values.

Replace values given in replace with value.

Sorting & transposing

Sort by the values along either axis.

Return transpose of DataFrame

Combining / comparing / joining / merging

Add new columns to a DataFrame.

Concatenate DataFrames together.

Merge DataFrame or named Series objects with a database-style join.

Plotting

Series.plot is both a callable method and a namespace attribute for specific plotting methods of the form Series.plot.<kind>.

Vertical bar plot.

Make a box plot of the DataFrame columns.

Make a violin plot of the DataFrame columns.

Draw one histogram of the DataFrame’s columns.

Generate Kernel Density Estimate plot using Gaussian kernels.

Plot Series or DataFrame as lines.

Generate a pie plot.

Time series plots

Display Series as Interactive table in Div

Serialization / IO / conversion

Convert DataFrame to a CSV file.

Convert the object to a JSON.

[`DataFrame.toExcel`](../input-output/danfo.to\_excel.md)

Convert DataFrame to Excel file

PreviousSeries.orNextCreating a DataFrame

Last updated 3 years ago

Was this helpful?

DataFrame.index
DataFrame.columns
DataFrame.ctypes
DataFrame.values
DataFrame.axis
DataFrame.ndim
DataFrame.size
DataFrame.shape
DataFrame.asType
DataFrame.copy
DataFrame.head
DataFrame.loc
DataFrame.iloc
DataFrame.tail
DataFrame.query
DataFrame.add
DataFrame.sub
DataFrame.mul
DataFrame.div
DataFrame.mod
DataFrame.pow
DataFrame.lt
DataFrame.gt
DataFrame.le
DataFrame.ge
DataFrame.ne
DataFrame.eq
DataFrame.apply
DataFrame.groupby
DataFrame.map
DataFrame.abs
DataFrame.corr
DataFrame.count
DataFrame.cumMax
DataFrame.cumMin
DataFrame.cumProd
DataFrame.cumSum
DataFrame.describe
DataFrame.max
DataFrame.mean
DataFrame.median
DataFrame.min
DataFrame.mode
DataFrame.round
DataFrame.sum
DataFrame.std
DataFrame.var
DataFrame.nUnique
DataFrame.drop
DataFrame.head
DataFrame.rename
DataFrame.resetIndex
DataFrame.sample
DataFrame.setIndex
DataFrame.tail
DataFrame.dropNa
DataFrame.fillNa
DataFrame.isNa
DataFrame.replace
DataFrame.sortVlues
DataFrame.T
DataFrame.addColumn
DataFrame.concat
DataFrame.merge
DataFrame.plot.bar
DataFrame.plot.box
DataFrame.plot.violin
DataFrame.plot.hist
DataFrame.plot.scatter
DataFrame.plot.line
DataFrame.plot.pie
Timeseries Plots
Table
DataFrame.toCSV
DataFrame.toJSON