├── .gitattributes
├── .github
├── CONTRIBUTING.md
├── ISSUE_TEMPLATE
│ ├── Bug_report.md
│ ├── Feature_request.md
│ └── Question.md
└── workflows
│ └── build.yml
├── .gitignore
├── .readthedocs.yaml
├── LICENSE
├── Makefile
├── README.md
├── VERSION.txt
├── ci
├── __init__.py
├── ext.py
├── gendoc.py
├── gh.py
├── headers.py
├── llvm-gcov.sh
└── xbuild
│ ├── __init__.py
│ ├── compiler.py
│ ├── extension.py
│ ├── logger.py
│ └── wheel.py
├── docs
├── Makefile
├── _ext
│ ├── changelog.py
│ ├── xcode.py
│ ├── xcomparisontable.py
│ ├── xcontributors.py
│ ├── xfunction.py
│ ├── xnodes.py
│ └── xpython.py
├── _static
│ ├── bootstrap.min.css
│ ├── bootstrap.min.js
│ ├── changelog.css
│ ├── datatable_small_icon.ico
│ ├── datatable_small_icon.svg
│ ├── datatable_small_logo.svg
│ ├── doctools.js
│ ├── fonts
│ │ ├── lato-bold-italic.woff2
│ │ ├── lato-bold.woff2
│ │ ├── lato-italic.woff2
│ │ └── lato-regular.woff2
│ ├── ftrl_algorithm.png
│ ├── h2o_logo.png
│ ├── h2o_logo.svg
│ ├── iris.csv
│ ├── py_datatable_logo.png
│ ├── py_datatable_logo.svg
│ ├── wren.css
│ ├── x-comparison-table.css
│ ├── xcode.css
│ ├── xfunction.css
│ └── xversion.css
├── _theme
│ ├── layout.html
│ ├── search.html
│ └── theme.conf
├── api
│ ├── dt
│ │ ├── as_type.rst
│ │ ├── build_info.rst
│ │ ├── by.rst
│ │ ├── categories.rst
│ │ ├── cbind.rst
│ │ ├── codes.rst
│ │ ├── corr.rst
│ │ ├── count.rst
│ │ ├── countna.rst
│ │ ├── cov.rst
│ │ ├── cumcount.rst
│ │ ├── cummax.rst
│ │ ├── cummin.rst
│ │ ├── cumprod.rst
│ │ ├── cumsum.rst
│ │ ├── cut.rst
│ │ ├── dt.rst
│ │ ├── f.rst
│ │ ├── fillna.rst
│ │ ├── first.rst
│ │ ├── fread.rst
│ │ ├── g.rst
│ │ ├── ifelse.rst
│ │ ├── init_styles.rst
│ │ ├── intersect.rst
│ │ ├── iread.rst
│ │ ├── join.rst
│ │ ├── last.rst
│ │ ├── max.rst
│ │ ├── mean.rst
│ │ ├── median.rst
│ │ ├── min.rst
│ │ ├── ngroup.rst
│ │ ├── nunique.rst
│ │ ├── prod.rst
│ │ ├── qcut.rst
│ │ ├── rbind.rst
│ │ ├── repeat.rst
│ │ ├── rowall.rst
│ │ ├── rowany.rst
│ │ ├── rowargmax.rst
│ │ ├── rowargmin.rst
│ │ ├── rowcount.rst
│ │ ├── rowfirst.rst
│ │ ├── rowlast.rst
│ │ ├── rowmax.rst
│ │ ├── rowmean.rst
│ │ ├── rowmin.rst
│ │ ├── rowsd.rst
│ │ ├── rowsum.rst
│ │ ├── sd.rst
│ │ ├── setdiff.rst
│ │ ├── shift.rst
│ │ ├── sort.rst
│ │ ├── split_into_nhot.rst
│ │ ├── sum.rst
│ │ ├── symdiff.rst
│ │ ├── union.rst
│ │ ├── unique.rst
│ │ └── update.rst
│ ├── exceptions.rst
│ ├── exceptions
│ │ ├── dtexception.rst
│ │ ├── dtwarning.rst
│ │ ├── importerror.rst
│ │ ├── indexerror.rst
│ │ ├── invalidoperationerror.rst
│ │ ├── ioerror.rst
│ │ ├── iowarning.rst
│ │ ├── keyerror.rst
│ │ ├── memoryerror.rst
│ │ ├── notimplementederror.rst
│ │ ├── overflowerror.rst
│ │ ├── typeerror.rst
│ │ └── valueerror.rst
│ ├── fexpr.rst
│ ├── fexpr
│ │ ├── __add__.rst
│ │ ├── __and__.rst
│ │ ├── __bool__.rst
│ │ ├── __eq__.rst
│ │ ├── __floordiv__.rst
│ │ ├── __ge__.rst
│ │ ├── __getitem__.rst
│ │ ├── __gt__.rst
│ │ ├── __init__.rst
│ │ ├── __invert__.rst
│ │ ├── __le__.rst
│ │ ├── __lshift__.rst
│ │ ├── __lt__.rst
│ │ ├── __mod__.rst
│ │ ├── __mul__.rst
│ │ ├── __ne__.rst
│ │ ├── __neg__.rst
│ │ ├── __or__.rst
│ │ ├── __pos__.rst
│ │ ├── __pow__.rst
│ │ ├── __repr__.rst
│ │ ├── __rshift__.rst
│ │ ├── __sub__.rst
│ │ ├── __truediv__.rst
│ │ ├── __xor__.rst
│ │ ├── alias.rst
│ │ ├── as_type.rst
│ │ ├── categories.rst
│ │ ├── codes.rst
│ │ ├── count.rst
│ │ ├── countna.rst
│ │ ├── cummax.rst
│ │ ├── cummin.rst
│ │ ├── cumprod.rst
│ │ ├── cumsum.rst
│ │ ├── extend.rst
│ │ ├── fillna.rst
│ │ ├── first.rst
│ │ ├── last.rst
│ │ ├── len.rst
│ │ ├── max.rst
│ │ ├── mean.rst
│ │ ├── median.rst
│ │ ├── min.rst
│ │ ├── nunique.rst
│ │ ├── prod.rst
│ │ ├── re_match.rst
│ │ ├── remove.rst
│ │ ├── rowall.rst
│ │ ├── rowany.rst
│ │ ├── rowargmax.rst
│ │ ├── rowargmin.rst
│ │ ├── rowcount.rst
│ │ ├── rowfirst.rst
│ │ ├── rowlast.rst
│ │ ├── rowmax.rst
│ │ ├── rowmean.rst
│ │ ├── rowmin.rst
│ │ ├── rowsd.rst
│ │ ├── rowsum.rst
│ │ ├── sd.rst
│ │ ├── shift.rst
│ │ └── sum.rst
│ ├── frame.rst
│ ├── frame
│ │ ├── __copy__.rst
│ │ ├── __delitem__.rst
│ │ ├── __getitem__.rst
│ │ ├── __getstate__.rst
│ │ ├── __init__.rst
│ │ ├── __iter__.rst
│ │ ├── __len__.rst
│ │ ├── __repr__.rst
│ │ ├── __reversed__.rst
│ │ ├── __setitem__.rst
│ │ ├── __sizeof__.rst
│ │ ├── __str__.rst
│ │ ├── cbind.rst
│ │ ├── colindex.rst
│ │ ├── copy.rst
│ │ ├── countna.rst
│ │ ├── countna1.rst
│ │ ├── export_names.rst
│ │ ├── head.rst
│ │ ├── key.rst
│ │ ├── keys.rst
│ │ ├── kurt.rst
│ │ ├── kurt1.rst
│ │ ├── ltypes.rst
│ │ ├── materialize.rst
│ │ ├── max.rst
│ │ ├── max1.rst
│ │ ├── mean.rst
│ │ ├── mean1.rst
│ │ ├── meta.rst
│ │ ├── min.rst
│ │ ├── min1.rst
│ │ ├── mode.rst
│ │ ├── mode1.rst
│ │ ├── names.rst
│ │ ├── ncols.rst
│ │ ├── nmodal.rst
│ │ ├── nmodal1.rst
│ │ ├── nrows.rst
│ │ ├── nunique.rst
│ │ ├── nunique1.rst
│ │ ├── rbind.rst
│ │ ├── replace.rst
│ │ ├── sd.rst
│ │ ├── sd1.rst
│ │ ├── shape.rst
│ │ ├── skew.rst
│ │ ├── skew1.rst
│ │ ├── sort.rst
│ │ ├── source.rst
│ │ ├── stype.rst
│ │ ├── stypes.rst
│ │ ├── sum.rst
│ │ ├── sum1.rst
│ │ ├── tail.rst
│ │ ├── to_arrow.rst
│ │ ├── to_csv.rst
│ │ ├── to_dict.rst
│ │ ├── to_jay.rst
│ │ ├── to_list.rst
│ │ ├── to_numpy.rst
│ │ ├── to_pandas.rst
│ │ ├── to_tuples.rst
│ │ ├── type.rst
│ │ ├── types.rst
│ │ └── view.rst
│ ├── index-api.rst
│ ├── internal.rst
│ ├── internal
│ │ ├── frame_column_data_r.rst
│ │ ├── frame_columns_virtual.rst
│ │ ├── frame_integrity_check.rst
│ │ └── get_thread_ids.rst
│ ├── ltype.rst
│ ├── ltype
│ │ ├── __new__.rst
│ │ └── stypes.rst
│ ├── math.rst
│ ├── math
│ │ ├── abs.rst
│ │ ├── arccos.rst
│ │ ├── arcosh.rst
│ │ ├── arcsin.rst
│ │ ├── arctan.rst
│ │ ├── arsinh.rst
│ │ ├── artanh.rst
│ │ ├── atan2.rst
│ │ ├── cbrt.rst
│ │ ├── ceil.rst
│ │ ├── copysign.rst
│ │ ├── cos.rst
│ │ ├── cosh.rst
│ │ ├── deg2rad.rst
│ │ ├── e.rst
│ │ ├── erf.rst
│ │ ├── erfc.rst
│ │ ├── exp.rst
│ │ ├── exp2.rst
│ │ ├── expm1.rst
│ │ ├── fabs.rst
│ │ ├── floor.rst
│ │ ├── fmod.rst
│ │ ├── gamma.rst
│ │ ├── golden.rst
│ │ ├── hypot.rst
│ │ ├── inf.rst
│ │ ├── isclose.rst
│ │ ├── isfinite.rst
│ │ ├── isinf.rst
│ │ ├── isna.rst
│ │ ├── ldexp.rst
│ │ ├── lgamma.rst
│ │ ├── log.rst
│ │ ├── log10.rst
│ │ ├── log1p.rst
│ │ ├── log2.rst
│ │ ├── logaddexp.rst
│ │ ├── logaddexp2.rst
│ │ ├── nan.rst
│ │ ├── pi.rst
│ │ ├── pow.rst
│ │ ├── rad2deg.rst
│ │ ├── rint.rst
│ │ ├── round.rst
│ │ ├── sign.rst
│ │ ├── signbit.rst
│ │ ├── sin.rst
│ │ ├── sinh.rst
│ │ ├── sqrt.rst
│ │ ├── square.rst
│ │ ├── tan.rst
│ │ ├── tanh.rst
│ │ ├── tau.rst
│ │ └── trunc.rst
│ ├── models.rst
│ ├── models
│ │ ├── Ftrl
│ │ │ ├── __init__.rst
│ │ │ ├── alpha.rst
│ │ │ ├── beta.rst
│ │ │ ├── colname_hashes.rst
│ │ │ ├── colnames.rst
│ │ │ ├── double_precision.rst
│ │ │ ├── feature_importances.rst
│ │ │ ├── fit.rst
│ │ │ ├── interactions.rst
│ │ │ ├── labels.rst
│ │ │ ├── lambda1.rst
│ │ │ ├── lambda2.rst
│ │ │ ├── mantissa_nbits.rst
│ │ │ ├── model.rst
│ │ │ ├── model_type.rst
│ │ │ ├── model_type_trained.rst
│ │ │ ├── nbins.rst
│ │ │ ├── negative_class.rst
│ │ │ ├── nepochs.rst
│ │ │ ├── params.rst
│ │ │ ├── predict.rst
│ │ │ └── reset.rst
│ │ ├── LinearModel
│ │ │ ├── __init__.rst
│ │ │ ├── double_precision.rst
│ │ │ ├── eta0.rst
│ │ │ ├── eta_decay.rst
│ │ │ ├── eta_drop_rate.rst
│ │ │ ├── eta_schedule.rst
│ │ │ ├── fit.rst
│ │ │ ├── is_fitted.rst
│ │ │ ├── labels.rst
│ │ │ ├── lambda1.rst
│ │ │ ├── lambda2.rst
│ │ │ ├── model.rst
│ │ │ ├── model_type.rst
│ │ │ ├── negative_class.rst
│ │ │ ├── nepochs.rst
│ │ │ ├── params.rst
│ │ │ ├── predict.rst
│ │ │ ├── reset.rst
│ │ │ └── seed.rst
│ │ ├── aggregate.rst
│ │ ├── ftrl.rst
│ │ ├── kfold.rst
│ │ ├── kfold_random.rst
│ │ └── linear_model.rst
│ ├── namespace.rst
│ ├── namespace
│ │ ├── __getattribute__.rst
│ │ └── __getitem__.rst
│ ├── options.rst
│ ├── options
│ │ ├── debug.rst
│ │ ├── debug
│ │ │ ├── arg_max_size.rst
│ │ │ ├── enabled.rst
│ │ │ ├── logger.rst
│ │ │ └── report_args.rst
│ │ ├── display.rst
│ │ ├── display
│ │ │ ├── allow_unicode.rst
│ │ │ ├── head_nrows.rst
│ │ │ ├── interactive.rst
│ │ │ ├── max_column_width.rst
│ │ │ ├── max_nrows.rst
│ │ │ ├── tail_nrows.rst
│ │ │ └── use_colors.rst
│ │ ├── frame.rst
│ │ ├── frame
│ │ │ ├── names_auto_index.rst
│ │ │ └── names_auto_prefix.rst
│ │ ├── fread.rst
│ │ ├── fread
│ │ │ ├── log.rst
│ │ │ ├── log
│ │ │ │ ├── anonymize.rst
│ │ │ │ └── escape_unicode.rst
│ │ │ ├── parse_dates.rst
│ │ │ └── parse_times.rst
│ │ ├── nthreads.rst
│ │ ├── progress.rst
│ │ └── progress
│ │ │ ├── allow_interruption.rst
│ │ │ ├── callback.rst
│ │ │ ├── clear_on_success.rst
│ │ │ ├── enabled.rst
│ │ │ ├── min_duration.rst
│ │ │ └── updates_per_second.rst
│ ├── re.rst
│ ├── re
│ │ └── match.rst
│ ├── str.rst
│ ├── str
│ │ ├── len.rst
│ │ ├── slice.rst
│ │ └── split_into_nhot.rst
│ ├── stype.rst
│ ├── stype
│ │ ├── __call__.rst
│ │ ├── __new__.rst
│ │ ├── ctype.rst
│ │ ├── dtype.rst
│ │ ├── ltype.rst
│ │ ├── max.rst
│ │ ├── min.rst
│ │ └── struct.rst
│ ├── time.rst
│ ├── time
│ │ ├── day.rst
│ │ ├── day_of_week.rst
│ │ ├── hour.rst
│ │ ├── minute.rst
│ │ ├── month.rst
│ │ ├── nanosecond.rst
│ │ ├── second.rst
│ │ ├── year.rst
│ │ ├── ymd.rst
│ │ └── ymdt.rst
│ ├── type.rst
│ └── type
│ │ ├── arr32.rst
│ │ ├── arr64.rst
│ │ ├── bool8.rst
│ │ ├── cat16.rst
│ │ ├── cat32.rst
│ │ ├── cat8.rst
│ │ ├── date32.rst
│ │ ├── float32.rst
│ │ ├── float64.rst
│ │ ├── int16.rst
│ │ ├── int32.rst
│ │ ├── int64.rst
│ │ ├── int8.rst
│ │ ├── is_array.rst
│ │ ├── is_boolean.rst
│ │ ├── is_categorical.rst
│ │ ├── is_compound.rst
│ │ ├── is_float.rst
│ │ ├── is_integer.rst
│ │ ├── is_numeric.rst
│ │ ├── is_object.rst
│ │ ├── is_string.rst
│ │ ├── is_temporal.rst
│ │ ├── is_void.rst
│ │ ├── max.rst
│ │ ├── min.rst
│ │ ├── name.rst
│ │ ├── obj64.rst
│ │ ├── str32.rst
│ │ ├── str64.rst
│ │ ├── time64.rst
│ │ └── void.rst
├── conf.py
├── develop
│ ├── contrib.rst
│ ├── create-fexpr.rst
│ ├── documentation.rst
│ ├── index-develop.rst
│ └── test.rst
├── docutils.conf
├── index.rst
├── manual
│ ├── comparison_with_pandas.rst
│ ├── comparison_with_rdatatable.rst
│ ├── comparison_with_sql.rst
│ ├── datetime.rst
│ ├── f-expressions.rst
│ ├── fread_examples.rst
│ ├── ftrl.rst
│ ├── groupby_examples.rst
│ ├── index-manual.rst
│ ├── name_mangling.rst
│ ├── row_functions.rst
│ ├── select_and_filter_data.rst
│ └── transform_data.rst
├── releases
│ ├── contributors.rst
│ ├── index-releases.rst
│ ├── v0.10.0.rst
│ ├── v0.10.1.rst
│ ├── v0.11.0.rst
│ ├── v0.11.1.rst
│ ├── v0.2.1.rst
│ ├── v0.2.2.rst
│ ├── v0.3.0.rst
│ ├── v0.3.1.rst
│ ├── v0.3.2.rst
│ ├── v0.4.0.rst
│ ├── v0.5.0.rst
│ ├── v0.6.0.rst
│ ├── v0.7.0.rst
│ ├── v0.8.0.rst
│ ├── v0.9.0.rst
│ ├── v1.0.0.rst
│ ├── v1.1.0.rst
│ └── v1.2.0.rst
└── start
│ ├── index-start.rst
│ ├── install.rst
│ ├── quick-start.rst
│ └── using-datatable.rst
├── pyproject.toml
├── requirements_docs.txt
├── requirements_extra.txt
├── requirements_tests.txt
├── setup.cfg
├── src
├── core
│ ├── _dt.h
│ ├── api.cc
│ ├── buffer.cc
│ ├── buffer.h
│ ├── call_logger.cc
│ ├── call_logger.h
│ ├── column.cc
│ ├── column.h
│ ├── column
│ │ ├── arrow.h
│ │ ├── arrow_array.cc
│ │ ├── arrow_array.h
│ │ ├── arrow_bool.cc
│ │ ├── arrow_bool.h
│ │ ├── arrow_fw.cc
│ │ ├── arrow_fw.h
│ │ ├── arrow_str.cc
│ │ ├── arrow_str.h
│ │ ├── arrow_void.cc
│ │ ├── arrow_void.h
│ │ ├── cast.cc
│ │ ├── cast.h
│ │ ├── cast_bool.cc
│ │ ├── cast_date32.cc
│ │ ├── cast_numeric.cc
│ │ ├── cast_object.cc
│ │ ├── cast_string.cc
│ │ ├── cast_to_array.cc
│ │ ├── cast_to_bool.cc
│ │ ├── cast_to_date32.cc
│ │ ├── cast_to_obj.cc
│ │ ├── cast_to_string.cc
│ │ ├── cast_to_time64.cc
│ │ ├── categorical.cc
│ │ ├── categorical.h
│ │ ├── column_impl.cc
│ │ ├── column_impl.h
│ │ ├── const.cc
│ │ ├── const.h
│ │ ├── const_na.cc
│ │ ├── count.h
│ │ ├── cumcountngroup.h
│ │ ├── cumminmax.h
│ │ ├── cumsumprod.h
│ │ ├── cut.h
│ │ ├── date_from_months.cc
│ │ ├── date_from_months.h
│ │ ├── date_from_weeks.cc
│ │ ├── date_from_weeks.h
│ │ ├── date_from_years.cc
│ │ ├── date_from_years.h
│ │ ├── func_binary.h
│ │ ├── func_nary.h
│ │ ├── func_unary.h
│ │ ├── ifelse.cc
│ │ ├── ifelse.h
│ │ ├── ifelsen.cc
│ │ ├── ifelsen.h
│ │ ├── isclose.h
│ │ ├── isna.h
│ │ ├── latent.cc
│ │ ├── latent.h
│ │ ├── mean.h
│ │ ├── minmax.h
│ │ ├── nafilled.cc
│ │ ├── nafilled.h
│ │ ├── npmasked.cc
│ │ ├── npmasked.h
│ │ ├── pysources.cc
│ │ ├── pysources.h
│ │ ├── qcut.h
│ │ ├── range.cc
│ │ ├── range.h
│ │ ├── rbound.cc
│ │ ├── rbound.h
│ │ ├── re_match.cc
│ │ ├── re_match.h
│ │ ├── reduce_unary.h
│ │ ├── repeated.cc
│ │ ├── repeated.h
│ │ ├── sentinel.cc
│ │ ├── sentinel.h
│ │ ├── sentinel_fw.cc
│ │ ├── sentinel_fw.h
│ │ ├── sentinel_str.cc
│ │ ├── sentinel_str.h
│ │ ├── shift.h
│ │ ├── string_plus.cc
│ │ ├── string_plus.h
│ │ ├── string_slice.cc
│ │ ├── string_slice.h
│ │ ├── strvec.h
│ │ ├── sumprod.h
│ │ ├── time_scaled.cc
│ │ ├── time_scaled.h
│ │ ├── truncated.cc
│ │ ├── truncated.h
│ │ ├── view.cc
│ │ ├── view.h
│ │ ├── virtual.cc
│ │ └── virtual.h
│ ├── column_from_arrow.cc
│ ├── column_from_python.cc
│ ├── cstring.cc
│ ├── cstring.h
│ ├── csv
│ │ ├── dtoa.h
│ │ ├── fread.cc
│ │ ├── itoa.h
│ │ ├── reader.cc
│ │ ├── reader.h
│ │ ├── reader_arff.cc
│ │ ├── reader_arff.h
│ │ ├── reader_fread.cc
│ │ ├── reader_fread.h
│ │ ├── toa.cc
│ │ └── toa.h
│ ├── datatable.cc
│ ├── datatable.h
│ ├── datatablemodule.cc
│ ├── datatablemodule.h
│ ├── documentation.h
│ ├── encodings.cc
│ ├── encodings.h
│ ├── expr
│ │ ├── args_registry.cc
│ │ ├── args_registry.h
│ │ ├── declarations.h
│ │ ├── eval_context.cc
│ │ ├── eval_context.h
│ │ ├── expr.cc
│ │ ├── expr.h
│ │ ├── fbinary
│ │ │ ├── bimaker.cc
│ │ │ ├── bimaker.h
│ │ │ ├── bimaker_impl.h
│ │ │ ├── bitwise.cc
│ │ │ ├── fexpr__add__.cc
│ │ │ ├── fexpr__compare__.cc
│ │ │ ├── fexpr__compare__.h
│ │ │ ├── fexpr__eq__.cc
│ │ │ ├── fexpr__floordiv__.cc
│ │ │ ├── fexpr__ge__.cc
│ │ │ ├── fexpr__gt__.cc
│ │ │ ├── fexpr__le__.cc
│ │ │ ├── fexpr__lt__.cc
│ │ │ ├── fexpr__mod__.cc
│ │ │ ├── fexpr__mul__.cc
│ │ │ ├── fexpr__ne__.cc
│ │ │ ├── fexpr__pow__.cc
│ │ │ ├── fexpr__sub__.cc
│ │ │ ├── fexpr__truediv__.cc
│ │ │ ├── fexpr_binaryop.cc
│ │ │ ├── fexpr_binaryop.h
│ │ │ ├── math.cc
│ │ │ └── pyfn.cc
│ │ ├── fexpr.cc
│ │ ├── fexpr.h
│ │ ├── fexpr_alias.cc
│ │ ├── fexpr_alias.h
│ │ ├── fexpr_astype.cc
│ │ ├── fexpr_categories.cc
│ │ ├── fexpr_codes.cc
│ │ ├── fexpr_column.h
│ │ ├── fexpr_column_asarg.cc
│ │ ├── fexpr_column_asattr.cc
│ │ ├── fexpr_count.cc
│ │ ├── fexpr_cumcountngroup.cc
│ │ ├── fexpr_cumminmax.cc
│ │ ├── fexpr_cumsumprod.cc
│ │ ├── fexpr_cut.cc
│ │ ├── fexpr_dict.cc
│ │ ├── fexpr_dict.h
│ │ ├── fexpr_extend_remove.cc
│ │ ├── fexpr_extend_remove.h
│ │ ├── fexpr_fillna.cc
│ │ ├── fexpr_frame.cc
│ │ ├── fexpr_frame.h
│ │ ├── fexpr_func.cc
│ │ ├── fexpr_func.h
│ │ ├── fexpr_func_unary.cc
│ │ ├── fexpr_func_unary.h
│ │ ├── fexpr_ifelse.cc
│ │ ├── fexpr_list.cc
│ │ ├── fexpr_list.h
│ │ ├── fexpr_literal.cc
│ │ ├── fexpr_literal.h
│ │ ├── fexpr_literal_bool.cc
│ │ ├── fexpr_literal_float.cc
│ │ ├── fexpr_literal_int.cc
│ │ ├── fexpr_literal_none.cc
│ │ ├── fexpr_literal_range.cc
│ │ ├── fexpr_literal_sliceall.cc
│ │ ├── fexpr_literal_sliceint.cc
│ │ ├── fexpr_literal_slicestr.cc
│ │ ├── fexpr_literal_string.cc
│ │ ├── fexpr_literal_type.cc
│ │ ├── fexpr_mean.cc
│ │ ├── fexpr_minmax.cc
│ │ ├── fexpr_qcut.cc
│ │ ├── fexpr_reduce_unary.cc
│ │ ├── fexpr_reduce_unary.h
│ │ ├── fexpr_round.cc
│ │ ├── fexpr_slice.cc
│ │ ├── fexpr_slice.h
│ │ ├── fexpr_sumprod.cc
│ │ ├── fnary
│ │ │ ├── fnary.cc
│ │ │ ├── fnary.h
│ │ │ ├── rowall.cc
│ │ │ ├── rowany.cc
│ │ │ ├── rowcount.cc
│ │ │ ├── rowfirstlast.cc
│ │ │ ├── rowmean.cc
│ │ │ ├── rowminmax.cc
│ │ │ ├── rowsd.cc
│ │ │ └── rowsum.cc
│ │ ├── funary
│ │ │ ├── basic.cc
│ │ │ ├── exponential.cc
│ │ │ ├── floating.cc
│ │ │ ├── hyperbolic.cc
│ │ │ ├── pyfn.cc
│ │ │ ├── pyfn.h
│ │ │ ├── special.cc
│ │ │ ├── trigonometric.cc
│ │ │ ├── umaker.cc
│ │ │ ├── umaker.h
│ │ │ └── umaker_impl.h
│ │ ├── head.cc
│ │ ├── head.h
│ │ ├── head_func.cc
│ │ ├── head_func.h
│ │ ├── head_func_binary.cc
│ │ ├── head_func_colset.cc
│ │ ├── head_func_isclose.cc
│ │ ├── head_func_shift.cc
│ │ ├── head_func_unary.cc
│ │ ├── head_reduce.cc
│ │ ├── head_reduce.h
│ │ ├── head_reduce_binary.cc
│ │ ├── head_reduce_unary.cc
│ │ ├── namespace.cc
│ │ ├── namespace.h
│ │ ├── op.h
│ │ ├── py_by.cc
│ │ ├── py_by.h
│ │ ├── py_join.cc
│ │ ├── py_join.h
│ │ ├── py_sort.cc
│ │ ├── py_sort.h
│ │ ├── py_update.cc
│ │ ├── py_update.h
│ │ ├── re
│ │ │ ├── fexpr_match.cc
│ │ │ └── fexpr_match.h
│ │ ├── str
│ │ │ ├── fexpr_len.cc
│ │ │ └── fexpr_len.h
│ │ ├── time
│ │ │ ├── fexpr_day_of_week.cc
│ │ │ ├── fexpr_hour_min_sec.cc
│ │ │ ├── fexpr_year_month_day.cc
│ │ │ ├── fexpr_ymd.cc
│ │ │ └── fexpr_ymdt.cc
│ │ ├── workframe.cc
│ │ └── workframe.h
│ ├── frame
│ │ ├── __getbuffer__.cc
│ │ ├── __getitem__.cc
│ │ ├── __init__.cc
│ │ ├── __iter__.cc
│ │ ├── __repr__.cc
│ │ ├── __sizeof__.cc
│ │ ├── cbind.cc
│ │ ├── integrity_check.cc
│ │ ├── join.cc
│ │ ├── key.cc
│ │ ├── names.cc
│ │ ├── py_frame.cc
│ │ ├── py_frame.h
│ │ ├── rbind.cc
│ │ ├── repeat.cc
│ │ ├── replace.cc
│ │ ├── repr
│ │ │ ├── html_styles.cc
│ │ │ ├── html_widget.h
│ │ │ ├── repr_options.cc
│ │ │ ├── repr_options.h
│ │ │ ├── terminal_widget.cc
│ │ │ ├── terminal_widget.h
│ │ │ ├── text_column.cc
│ │ │ ├── text_column.h
│ │ │ ├── widget.cc
│ │ │ └── widget.h
│ │ ├── stats.cc
│ │ ├── to_arrow.cc
│ │ ├── to_csv.cc
│ │ ├── to_numpy.cc
│ │ ├── to_pandas.cc
│ │ └── to_python.cc
│ ├── groupby.cc
│ ├── groupby.h
│ ├── jay
│ │ ├── README.md
│ │ ├── jay.fbs
│ │ ├── jay_generated.h
│ │ ├── jay_nowarnings.h
│ │ ├── open_jay.cc
│ │ └── save_jay.cc
│ ├── lib
│ │ ├── flatbuffers
│ │ │ ├── base.h
│ │ │ ├── flatbuffers.h
│ │ │ └── stl_emulation.h
│ │ ├── hh
│ │ │ ├── date.cc
│ │ │ └── date.h
│ │ ├── mman
│ │ │ ├── mman.cc
│ │ │ └── mman.h
│ │ ├── parallel_hashmap
│ │ │ ├── meminfo.h
│ │ │ ├── phmap.h
│ │ │ ├── phmap_base.h
│ │ │ ├── phmap_bits.h
│ │ │ ├── phmap_config.h
│ │ │ ├── phmap_fwd_decl.h
│ │ │ └── phmap_utils.h
│ │ └── zlib
│ │ │ ├── adler32.cc
│ │ │ ├── crc32.cc
│ │ │ ├── crc32.h
│ │ │ ├── deflate.cc
│ │ │ ├── deflate.h
│ │ │ ├── trees.cc
│ │ │ ├── trees.h
│ │ │ ├── zconf.h
│ │ │ ├── zlib.h
│ │ │ ├── zutil.cc
│ │ │ └── zutil.h
│ ├── ltype.cc
│ ├── ltype.h
│ ├── mmm.cc
│ ├── mmm.h
│ ├── models
│ │ ├── aggregate.cc
│ │ ├── aggregate.h
│ │ ├── column_caster.cc
│ │ ├── column_caster.h
│ │ ├── column_hasher.cc
│ │ ├── column_hasher.h
│ │ ├── dt_ftrl.cc
│ │ ├── dt_ftrl.h
│ │ ├── dt_ftrl_base.cc
│ │ ├── dt_ftrl_base.h
│ │ ├── dt_linearmodel.cc
│ │ ├── dt_linearmodel.h
│ │ ├── dt_linearmodel_base.cc
│ │ ├── dt_linearmodel_base.h
│ │ ├── dt_linearmodel_classification.h
│ │ ├── dt_linearmodel_regression.h
│ │ ├── dt_linearmodel_types.h
│ │ ├── kfold.cc
│ │ ├── label_encode.cc
│ │ ├── label_encode.h
│ │ ├── murmurhash.cc
│ │ ├── murmurhash.h
│ │ ├── py_ftrl.cc
│ │ ├── py_ftrl.h
│ │ ├── py_linearmodel.cc
│ │ ├── py_linearmodel.h
│ │ ├── py_validator.cc
│ │ ├── py_validator.h
│ │ ├── utils.cc
│ │ └── utils.h
│ ├── options.cc
│ ├── options.h
│ ├── parallel
│ │ ├── api.h
│ │ ├── api_primitives.cc
│ │ ├── api_primitives.h
│ │ ├── atomic.h
│ │ ├── job_idle.cc
│ │ ├── job_idle.h
│ │ ├── job_shutdown.cc
│ │ ├── job_shutdown.h
│ │ ├── parallel_for_dynamic.cc
│ │ ├── parallel_for_ordered.cc
│ │ ├── parallel_for_static.h
│ │ ├── parallel_region.cc
│ │ ├── python_lock.cc
│ │ ├── python_lock.h
│ │ ├── semaphore.h
│ │ ├── shared_mutex.h
│ │ ├── spin_mutex.h
│ │ ├── thread_job.cc
│ │ ├── thread_job.h
│ │ ├── thread_pool.cc
│ │ ├── thread_pool.h
│ │ ├── thread_team.cc
│ │ ├── thread_team.h
│ │ ├── thread_worker.cc
│ │ └── thread_worker.h
│ ├── progress
│ │ ├── _options.cc
│ │ ├── _options.h
│ │ ├── progress_bar.cc
│ │ ├── progress_bar.h
│ │ ├── progress_manager.cc
│ │ ├── progress_manager.h
│ │ ├── work.cc
│ │ └── work.h
│ ├── py_buffers.cc
│ ├── py_encodings.cc
│ ├── py_encodings.h
│ ├── python
│ │ ├── _all.h
│ │ ├── arg.cc
│ │ ├── arg.h
│ │ ├── args.cc
│ │ ├── args.h
│ │ ├── bool.cc
│ │ ├── bool.h
│ │ ├── date.cc
│ │ ├── date.h
│ │ ├── datetime.h
│ │ ├── dict.cc
│ │ ├── dict.h
│ │ ├── ext_module.h
│ │ ├── float.cc
│ │ ├── float.h
│ │ ├── int.cc
│ │ ├── int.h
│ │ ├── iter.cc
│ │ ├── iter.h
│ │ ├── list.cc
│ │ ├── list.h
│ │ ├── namedtuple.cc
│ │ ├── namedtuple.h
│ │ ├── obj.cc
│ │ ├── obj.h
│ │ ├── pybuffer.cc
│ │ ├── pybuffer.h
│ │ ├── python.h
│ │ ├── range.cc
│ │ ├── range.h
│ │ ├── set.cc
│ │ ├── set.h
│ │ ├── slice.cc
│ │ ├── slice.h
│ │ ├── string.cc
│ │ ├── string.h
│ │ ├── tuple.cc
│ │ ├── tuple.h
│ │ ├── xargs.cc
│ │ ├── xargs.h
│ │ ├── xobject.cc
│ │ └── xobject.h
│ ├── read
│ │ ├── chunk_coordinates.cc
│ │ ├── chunk_coordinates.h
│ │ ├── colinfo.h
│ │ ├── constants.cc
│ │ ├── constants.h
│ │ ├── field64.h
│ │ ├── fread
│ │ │ ├── fread_parallel_reader.cc
│ │ │ ├── fread_parallel_reader.h
│ │ │ ├── fread_thread_context.cc
│ │ │ └── fread_thread_context.h
│ │ ├── input_column.cc
│ │ ├── input_column.h
│ │ ├── multisource.cc
│ │ ├── multisource.h
│ │ ├── output_column.cc
│ │ ├── output_column.h
│ │ ├── parallel_reader.cc
│ │ ├── parallel_reader.h
│ │ ├── parse_context.cc
│ │ ├── parse_context.h
│ │ ├── parsers
│ │ │ ├── info.cc
│ │ │ ├── info.h
│ │ │ ├── parse_bool.cc
│ │ │ ├── parse_date.cc
│ │ │ ├── parse_float.cc
│ │ │ ├── parse_int.cc
│ │ │ ├── parse_string.cc
│ │ │ ├── parse_time.cc
│ │ │ ├── parse_void.cc
│ │ │ ├── pt.h
│ │ │ ├── ptype_iterator.cc
│ │ │ ├── ptype_iterator.h
│ │ │ └── rt.h
│ │ ├── preframe.cc
│ │ ├── preframe.h
│ │ ├── py_fread.cc
│ │ ├── py_read_iterator.cc
│ │ ├── py_read_iterator.h
│ │ ├── source.cc
│ │ ├── source.h
│ │ ├── thread_context.cc
│ │ └── thread_context.h
│ ├── rowindex.cc
│ ├── rowindex.h
│ ├── rowindex_array.cc
│ ├── rowindex_impl.h
│ ├── rowindex_slice.cc
│ ├── set_funcs.cc
│ ├── sort.cc
│ ├── sort.h
│ ├── sort
│ │ ├── common.h
│ │ ├── grouper.h
│ │ ├── insert-sort.h
│ │ ├── radix-sort.h
│ │ ├── sorter.cc
│ │ ├── sorter.h
│ │ ├── sorter_bool.h
│ │ ├── sorter_float.h
│ │ ├── sorter_int.h
│ │ ├── sorter_multi.h
│ │ └── sorter_raw.h
│ ├── sort_groups.cc
│ ├── sort_insert.cc
│ ├── stats.cc
│ ├── stats.h
│ ├── str
│ │ ├── split_into_nhot.cc
│ │ ├── utils.cc
│ │ └── utils.h
│ ├── stype.cc
│ ├── stype.h
│ ├── tests
│ │ ├── test_atomic.cc
│ │ ├── test_barrier.cc
│ │ ├── test_parallel_for.cc
│ │ ├── test_parallel_for_ordered.cc
│ │ ├── test_progress.cc
│ │ └── test_shared_mutex.cc
│ ├── types
│ │ ├── py_type.cc
│ │ ├── py_type.h
│ │ ├── type.cc
│ │ ├── type.h
│ │ ├── type_array.cc
│ │ ├── type_array.h
│ │ ├── type_bool.cc
│ │ ├── type_bool.h
│ │ ├── type_categorical.cc
│ │ ├── type_categorical.h
│ │ ├── type_date.cc
│ │ ├── type_date.h
│ │ ├── type_float.cc
│ │ ├── type_float.h
│ │ ├── type_int.cc
│ │ ├── type_int.h
│ │ ├── type_invalid.cc
│ │ ├── type_invalid.h
│ │ ├── type_object.cc
│ │ ├── type_object.h
│ │ ├── type_string.cc
│ │ ├── type_string.h
│ │ ├── type_time.cc
│ │ ├── type_time.h
│ │ ├── type_void.cc
│ │ ├── type_void.h
│ │ ├── typeimpl.cc
│ │ ├── typeimpl.h
│ │ ├── typeimpl_numeric.cc
│ │ └── typeimpl_numeric.h
│ ├── utils
│ │ ├── alloc.cc
│ │ ├── alloc.h
│ │ ├── arrow_structs.h
│ │ ├── assert.h
│ │ ├── exceptions.cc
│ │ ├── exceptions.h
│ │ ├── file.cc
│ │ ├── file.h
│ │ ├── function.h
│ │ ├── fuzzy_match.cc
│ │ ├── fuzzy_match.h
│ │ ├── logger.cc
│ │ ├── logger.h
│ │ ├── macros.h
│ │ ├── misc.cc
│ │ ├── misc.h
│ │ ├── temporary_file.cc
│ │ ├── temporary_file.h
│ │ ├── terminal
│ │ │ ├── terminal.cc
│ │ │ ├── terminal.h
│ │ │ ├── terminal_stream.cc
│ │ │ ├── terminal_stream.h
│ │ │ ├── terminal_style.h
│ │ │ ├── tstring.cc
│ │ │ ├── tstring.h
│ │ │ ├── tstring_impl.cc
│ │ │ ├── tstring_impl.h
│ │ │ ├── tstring_mixed.cc
│ │ │ ├── tstring_plain.cc
│ │ │ └── tstring_styled.cc
│ │ ├── tests.cc
│ │ ├── tests.h
│ │ └── wcwidth.cc
│ ├── write
│ │ ├── csv_writer.cc
│ │ ├── csv_writer.h
│ │ ├── output_options.h
│ │ ├── value_writer.cc
│ │ ├── value_writer.h
│ │ ├── write_chronicler.cc
│ │ ├── write_chronicler.h
│ │ ├── write_manager.cc
│ │ ├── write_manager.h
│ │ ├── writing_context.cc
│ │ ├── writing_context.h
│ │ └── zlib_writer.h
│ ├── writebuf.cc
│ ├── writebuf.h
│ ├── wstringcol.cc
│ └── wstringcol.h
└── datatable
│ ├── __init__.py
│ ├── exceptions.py
│ ├── expr
│ ├── __init__.py
│ ├── expr.py
│ ├── math.py
│ └── reduce.py
│ ├── frame.py
│ ├── include
│ └── datatable.h
│ ├── internal.py
│ ├── lib
│ └── __init__.py
│ ├── math.py
│ ├── models.py
│ ├── options.py
│ ├── re.py
│ ├── str.py
│ ├── time.py
│ ├── types.py
│ ├── utils
│ ├── __init__.py
│ ├── fread.py
│ └── misc.py
│ └── xls.py
├── tests
├── __init__.py
├── conftest.py
├── dt
│ ├── README.md
│ ├── test-alias.py
│ ├── test-astype.py
│ ├── test-countna.py
│ ├── test-cumcountngroup.py
│ ├── test-cumminmax.py
│ ├── test-cumprod.py
│ ├── test-cumsum.py
│ ├── test-cut.py
│ ├── test-fillna.py
│ ├── test-ifelse.py
│ ├── test-minmax.py
│ ├── test-nunique.py
│ ├── test-qcut.py
│ └── test-shift.py
├── expr
│ └── fbinary
│ │ ├── test-add.py
│ │ ├── test-floordiv.py
│ │ ├── test-mod.py
│ │ ├── test-mul.py
│ │ ├── test-pow.py
│ │ ├── test-sub.py
│ │ └── test-truediv.py
├── frame
│ ├── test-colindex.py
│ ├── test-copy.py
│ ├── test-create.py
│ ├── test-repr-html.py
│ ├── test-repr-text.py
│ ├── test-to-arrow.py
│ ├── test-to-numpy.py
│ ├── test-to-pandas.py
│ └── test-tocsv.py
├── fread
│ ├── test-fread-api.py
│ ├── test-fread-detect.py
│ ├── test-fread-issues.py
│ ├── test-fread-large.py
│ ├── test-fread-random.py
│ ├── test-fread-small.py
│ └── test-xls.py
├── ijby
│ ├── test-assign-expr.py
│ ├── test-assign-frame.py
│ ├── test-assign-scalar.py
│ ├── test-assign.py
│ ├── test-func-unary.py
│ ├── test-math-floating.py
│ ├── test-rowwise.py
│ ├── test-sort.py
│ └── test-update.py
├── math
│ ├── test-isna.py
│ └── test-round.py
├── models
│ ├── test-aggregate.py
│ ├── test-ftrl.py
│ ├── test-kfold.py
│ └── test-linearmodel.py
├── munging
│ ├── test-cast.py
│ ├── test-cbind.py
│ ├── test-delete.py
│ ├── test-dt-cols.py
│ ├── test-dt-combo.py
│ ├── test-dt-rows.py
│ ├── test-rbind.py
│ ├── test-replace.py
│ └── test-str.py
├── re
│ └── test-match.py
├── str
│ ├── test-len.py
│ └── test-slice.py
├── test-docs.py
├── test-dt-expr.py
├── test-dt-stats.py
├── test-dt.py
├── test-f.py
├── test-groups.py
├── test-import-all.py
├── test-jay.py
├── test-join.py
├── test-keys.py
├── test-options.py
├── test-parallel.py
├── test-reduce.py
├── test-sets.py
├── test-utils-misc.py
├── time
│ ├── test-day-of-week.py
│ ├── test-hour-min-sec.py
│ ├── test-year-month-day.py
│ ├── test-ymd.py
│ └── test-ymdt.py
├── types
│ ├── __init__.py
│ ├── test-array.py
│ ├── test-bool8.py
│ ├── test-categorical.py
│ ├── test-date32.py
│ ├── test-float.py
│ ├── test-int.py
│ ├── test-obj64.py
│ ├── test-str.py
│ ├── test-time64.py
│ ├── test-type.py
│ └── test-void.py
└── valgrind-python.supp
└── tests_random
├── __init__.py
├── continuous.py
├── metaframe.py
├── methods
├── __init__.py
├── add_numpy_column.py
├── add_range_column.py
├── cbind_self.py
├── change_nrows.py
├── delete_columns_array.py
├── delete_rows_array.py
├── join_self.py
├── rbind_self.py
├── replace_nas_in_column.py
├── select_rows_array.py
├── select_rows_with_boolean_column.py
├── set_key_columns.py
├── shallow_copy.py
├── slice_columns.py
├── slice_rows.py
└── sort_columns.py
├── single.py
└── utils.py
/.gitattributes:
--------------------------------------------------------------------------------
1 | src/core/lib/* linguist-vendored
2 | src/core/jay/jay_generated.h linguist-generated
3 | *.h linguist-language=C++
4 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/Bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Is something not right? Let us know.
4 |
5 | ---
6 |
7 | - Did you find a bug in datatable, or maybe the bug found you?
8 | Tell us what it is.
9 |
10 | - How to reproduce the bug?
11 | **This part is the most important**. Please provide a code snippet which, when
12 | executed in console, demonstrates the problem. If necessary, attach any data
13 | files to the issue.
14 |
15 | - What was the expected behavior?
16 | In case it is not obvious, please tell us what result should your code
17 | produce.
18 |
19 | - Your environment?
20 | What is your datatable version, python version, and operating system?
21 |
22 | - Tag the issue with `[bug]` or `[segfault]` (depending on whether it crashes
23 | Python or not).
24 |
25 | - Thank you for contributing, and sorry for the inconvenience.
26 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/Feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for new datatable functionality
4 |
5 | ---
6 |
7 | - Describe what feature you would like to see implemented.
8 |
9 | - If possible, give an example of how it may look in the code and what result
10 | will be produced.
11 |
12 | - Click "Preview" to check that there are no formatting problems, that the
13 | request is stated clearly, and that it is not overbroad in scope.
14 |
15 | - Thanks for contributing. We appreciate your input!
16 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/Question.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Question
3 | about: I was wondering...
4 |
5 | ---
6 |
7 | Do you have a general question about datatable functionality?
8 | The best place to ask is StackOverflow. Be sure to tag your question
9 | with `[python] + [py-datatable]` tags, plus any other that you see fit.
10 |
11 | Questions posted on StackOverflow will be seen by more people,
12 | answered faster, and will be findable by others with a similar
13 | problem. Plus, you'll earn reputation points!
14 |
15 | However, if your question is directed specifically to the datatable
16 | developers, or does not fit into the SO format (for example, if it is
17 | primarily opinion-based), then visit our
18 | [Gitter chat room](https://gitter.im/h2oai/datatable) and ask there.
19 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Byte-compiled / optimized / DLL files
2 | __pycache__/
3 | *$py.class
4 | *.o
5 |
6 |
7 | # Distribution / packaging
8 | .cache/
9 | build/
10 | dist/
11 | src/datatable/lib/*
12 | !src/datatable/lib/__init__.py
13 | *.egg-info/
14 |
15 |
16 | # Coverage reports / tests
17 | pycov/
18 | ccov/
19 | .coverage
20 | coverage.xml
21 | coverage.info
22 | .benchmarks
23 | .pytest_cache/
24 | random_attack_logs/
25 | tests_random/logs/
26 |
27 |
28 | # Sphinx documentation
29 | docs/_build/
30 |
31 |
32 | # IPython Notebook
33 | .ipynb_checkpoints
34 |
35 |
36 | # Project managers
37 | .idea/*
38 | !.idea/inspectionProfiles
39 | *.sublime-*
40 | .DS_Store
41 | .vscode
42 |
43 | # Landfill area
44 | temp/
45 |
46 |
47 | # Auto-generated files
48 | src/datatable/_build_info.py
49 | src/core/documentation.cc
50 |
51 | # vscode settings
52 | .vscode/settings.json
53 | .vscode/c_cpp_properties.json
54 |
--------------------------------------------------------------------------------
/.readthedocs.yaml:
--------------------------------------------------------------------------------
1 | # [Read the Docs] configuration file
2 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3 |
4 | version: 2
5 |
6 | sphinx:
7 | builder: html
8 | configuration: docs/conf.py
9 | fail_on_warning: true
10 |
11 | python:
12 | version: 3.6
13 | install:
14 | - requirements: requirements_docs.txt
15 |
--------------------------------------------------------------------------------
/VERSION.txt:
--------------------------------------------------------------------------------
1 | 1.2.0a
2 |
--------------------------------------------------------------------------------
/ci/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/h2oai/datatable/3611640171e089eadf26012832936b341fda7a44/ci/__init__.py
--------------------------------------------------------------------------------
/ci/llvm-gcov.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | if [ -n "$LLVM7" ]; then
4 | exec "$LLVM7/bin/llvm-cov" gcov "$@"
5 |
6 | elif [ -n "$LLVM6" ]; then
7 | exec "$LLVM6/bin/llvm-cov" gcov "$@"
8 |
9 | elif [ -n "$LLVM5" ]; then
10 | exec "$LLVM5/bin/llvm-cov" gcov "$@"
11 |
12 | elif [ -n "$LLVM4" ]; then
13 | exec "$LLVM4/bin/llvm-cov" gcov "$@"
14 |
15 | elif [ -f "/usr/local/opt/llvm/bin/llvm-cov" ]; then
16 | exec "/usr/local/opt/llvm/bin/llvm-cov" gcov "$@"
17 |
18 | else
19 | exec gcov "$@"
20 |
21 | fi
22 |
--------------------------------------------------------------------------------
/docs/Makefile:
--------------------------------------------------------------------------------
1 | # Minimal makefile for Sphinx documentation
2 | #
3 |
4 | # You can set these variables from the command line.
5 | SPHINXOPTS =
6 | SPHINXBUILD = sphinx-build
7 | SOURCEDIR = .
8 | BUILDDIR = _build
9 |
10 | # Put it first so that "make" without argument is like "make help".
11 | help:
12 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
13 |
14 | # Do not remove directory $BUILDDIR itself: if there is a web server running
15 | # from that directory and it gets removed, then the server has to be restarted.
16 | clean:
17 | rm -rf ${BUILDDIR}/doctrees/*
18 | rm -rf ${BUILDDIR}/html/*
19 |
20 | .PHONY: help Makefile
21 |
22 | # Catch-all target: route all unknown targets to Sphinx using the new
23 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
24 | %: Makefile
25 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
26 |
--------------------------------------------------------------------------------
/docs/_static/datatable_small_icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/h2oai/datatable/3611640171e089eadf26012832936b341fda7a44/docs/_static/datatable_small_icon.ico
--------------------------------------------------------------------------------
/docs/_static/fonts/lato-bold-italic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/h2oai/datatable/3611640171e089eadf26012832936b341fda7a44/docs/_static/fonts/lato-bold-italic.woff2
--------------------------------------------------------------------------------
/docs/_static/fonts/lato-bold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/h2oai/datatable/3611640171e089eadf26012832936b341fda7a44/docs/_static/fonts/lato-bold.woff2
--------------------------------------------------------------------------------
/docs/_static/fonts/lato-italic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/h2oai/datatable/3611640171e089eadf26012832936b341fda7a44/docs/_static/fonts/lato-italic.woff2
--------------------------------------------------------------------------------
/docs/_static/fonts/lato-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/h2oai/datatable/3611640171e089eadf26012832936b341fda7a44/docs/_static/fonts/lato-regular.woff2
--------------------------------------------------------------------------------
/docs/_static/ftrl_algorithm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/h2oai/datatable/3611640171e089eadf26012832936b341fda7a44/docs/_static/ftrl_algorithm.png
--------------------------------------------------------------------------------
/docs/_static/h2o_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/h2oai/datatable/3611640171e089eadf26012832936b341fda7a44/docs/_static/h2o_logo.png
--------------------------------------------------------------------------------
/docs/_static/py_datatable_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/h2oai/datatable/3611640171e089eadf26012832936b341fda7a44/docs/_static/py_datatable_logo.png
--------------------------------------------------------------------------------
/docs/_static/x-comparison-table.css:
--------------------------------------------------------------------------------
1 |
2 | table.x-comparison-table {
3 | width: 100%;
4 | }
5 |
6 | table.x-comparison-table th,
7 | table.x-comparison-table td {
8 | vertical-align: top;
9 | width: 50%;
10 | }
11 |
12 | table.x-comparison-table td:first-child,
13 | table.x-comparison-table th:first-child {
14 | padding-right: 4px;
15 | }
16 |
17 | table.x-comparison-table td:last-child,
18 | table.x-comparison-table th:last-child {
19 | padding-left: 4px;
20 | }
21 |
22 |
23 |
24 | table.x-comparison-table tr.table-header th div {
25 | background-color: #e8eaea;
26 | border-radius: 4px;
27 | box-shadow: 1px 1px 2px #888;
28 | padding: 4px 8px;
29 | }
30 |
31 | table.x-comparison-table tr.section-header td p:first-child {
32 | margin-top: 1rem;
33 | }
34 |
35 | table.x-comparison-table tr.section-header td p:last-child {
36 | margin-bottom: 0;
37 | }
38 |
39 | table.x-comparison-table div.xcode div.output,
40 | table.x-comparison-table div.xcode code {
41 | margin-left: 0;
42 | }
43 |
44 | table.x-comparison-table div.xcode:last-child {
45 | margin-bottom: 0;
46 | }
47 |
--------------------------------------------------------------------------------
/docs/_theme/theme.conf:
--------------------------------------------------------------------------------
1 | [theme]
2 | inherit = basic
3 | style = wren.css
4 | pygments_style = sphinx
5 |
6 | [options]
7 | logo = _static/h2o_logo.svg
8 |
9 | collapse_navigation = True
10 | sticky_navigation = True
11 | navigation_depth = 4
12 | includehidden = True
13 | titles_only =
14 |
--------------------------------------------------------------------------------
/docs/api/dt/categories.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.categories
3 | :src: src/core/expr/fexpr_categories.cc pyfn_categories
4 | :tests: tests/types/test-categorical.py
5 | :cvar: doc_dt_categories
6 | :signature: categories(cols)
7 |
8 | .. x-version-added:: 1.1.0
9 |
10 | Get categories for categorical data.
11 |
12 | Parameters
13 | ----------
14 | cols: FExpr
15 | Input categorical data.
16 |
17 | return: FExpr
18 | f-expression that returns categories for each column
19 | from `cols`.
20 |
21 | except: TypeError
22 | The exception is raised when one of the columns from `cols`
23 | has a non-categorical type.
24 |
--------------------------------------------------------------------------------
/docs/api/dt/codes.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.codes
3 | :src: src/core/expr/fexpr_codes.cc pyfn_codes
4 | :tests: tests/types/test-categorical.py
5 | :cvar: doc_dt_codes
6 | :signature: codes(cols)
7 |
8 | .. x-version-added:: 1.1.0
9 |
10 | Get integer codes for categorical data.
11 |
12 | Parameters
13 | ----------
14 | cols: FExpr
15 | Input categorical data.
16 |
17 | return: FExpr
18 | f-expression that returns integer codes for each column
19 | from `cols`.
20 |
21 | except: TypeError
22 | The exception is raised when one of the columns from `cols`
23 | has a non-categorical type.
24 |
--------------------------------------------------------------------------------
/docs/api/dt/dt.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xdata:: datatable.dt
3 | :src: src/datatable/__init__.py dt
4 |
5 | This is the :mod:`datatable` module itself.
6 |
7 | The purpose of exporting this symbol is so that you can easily
8 | import all the things you need from the datatable module in one
9 | go::
10 |
11 | >>> from datatable import dt, f, g, by, join, mean
12 |
13 | Note: while it is possible to write
14 |
15 | .. code-block:: python
16 |
17 | >>> test = dt.dt.dt.dt.dt.dt.dt.dt.dt.fread('test.jay')
18 | >>> train = dt.dt.dt.dt.dt.dt.dt.dt.dt.dt.dt.dt.dt.fread('train.jay')
19 |
20 | we do not in fact recommend doing so (except possibly on April 1st).
21 |
--------------------------------------------------------------------------------
/docs/api/dt/f.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xdata:: datatable.f
3 | :src: src/datatable/expr/expr.py f
4 |
5 | The main :class:`Namespace` object.
6 |
7 | The function of this object is that during the evaluation of a
8 | :meth:`DT[i,j]
` call, the variable ``f``
9 | represents the columns of frame ``DT``.
10 |
11 | Specifically, *within* expression ``DT[i, j]`` the following
12 | is true:
13 |
14 | - ``f.A`` means "column A" of frame ``DT``;
15 | - ``f[2]`` means "3rd colum" of frame ``DT``;
16 | - ``f[int]`` means "all integer columns" of ``DT``;
17 | - ``f[:]`` means "all columns" of ``DT`` not including :func:`by` columns, however.
18 |
19 |
20 | See also
21 | --------
22 | - :data:`g` -- namespace for joined frames.
23 |
--------------------------------------------------------------------------------
/docs/api/dt/g.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xdata:: datatable.g
3 | :src: src/datatable/expr/expr.py g
4 |
5 | Secondary :class:`Namespace` object.
6 |
7 | The function of this object is that during the evaluation of a
8 | :meth:`DT[..., join(X)] ` call, the variable
9 | ``g`` represents the columns of the joined frame ``X``. In SQL
10 | this would have been equivalent to ``... JOIN tableX AS g ...``.
11 |
12 | See also
13 | --------
14 | - :data:`f` -- main column namespace.
15 |
--------------------------------------------------------------------------------
/docs/api/dt/init_styles.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.init_styles
3 | :src: src/core/frame/repr/html_styles.cc py_init_styles
4 | :cvar: doc_dt_init_styles
5 | :signature: init_styles()
6 |
7 | Inject datatable's stylesheets into the Jupyter notebook. This
8 | function does nothing when it runs in a normal Python environment
9 | outside of Jupyter.
10 |
11 | When datatable runs in a Jupyter notebook, it renders its Frames
12 | as HTML tables. The appearance of these tables is enhanced using
13 | a custom stylesheet, which must be injected into the notebook at
14 | any point on the page. This is exactly what this function does.
15 |
16 | Normally, this function is called automatically when datatable
17 | is imported. However, in some circumstances Jupyter erases these
18 | stylesheets (for example, if you run ``import datatable`` cell
19 | twice). In such cases, you may need to call this method manually.
20 |
--------------------------------------------------------------------------------
/docs/api/dt/split_into_nhot.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.split_into_nhot
3 | :src: --
4 | :cvar: doc_dt_split_into_nhot
5 | :signature: split_into_nhot(frame, sep=",", sort=False)
6 |
7 | .. x-version-deprecated:: 1.0.0
8 |
9 | This function is deprecated and will be removed in version 1.1.0.
10 | Please use :func:`dt.str.split_into_nhot()` instead.
11 |
--------------------------------------------------------------------------------
/docs/api/exceptions/dtexception.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xexc:: datatable.exceptions.DtException
3 | :src: --
4 |
5 | Base class for all exceptions raised by ``datatable``.
6 |
--------------------------------------------------------------------------------
/docs/api/exceptions/dtwarning.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xexc:: datatable.exceptions.DatatableWarning
3 | :src: --
4 |
5 | Generic warning from the :mod:`datatable`.
6 |
--------------------------------------------------------------------------------
/docs/api/exceptions/importerror.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xexc:: datatable.exceptions.ImportError
3 | :src: --
4 |
5 | This exception may be raised when a datatable operation requires an external
6 | module or library, but that module is not available. Examples of such
7 | operations include: converting a Frame into a pandas DataFrame, or into an
8 | Arrow Table, or reading an Excel file.
9 |
10 | Inherits from Python :py:exc:`ImportError` and :exc:`datatable.exceptions.DtException`.
11 |
--------------------------------------------------------------------------------
/docs/api/exceptions/indexerror.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xexc:: datatable.exceptions.IndexError
3 | :src: --
4 |
5 | Raised when accessing an element of a frame by index, but the value of the
6 | index falls outside of the boundaries of the frame.
7 |
8 | Inherits from Python :py:exc:`IndexError` and :exc:`datatable.exceptions.DtException`.
9 |
--------------------------------------------------------------------------------
/docs/api/exceptions/invalidoperationerror.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xexc:: datatable.exceptions.InvalidOperationError
3 | :src: --
4 |
5 | Raised in multiple scenarios whenever the requested operation is
6 | logically invalid with the given combination of parameters.
7 |
8 | For example, :meth:`cbind `-ing several frames with
9 | incompatible shapes.
10 |
11 | Inherits from :exc:`datatable.exceptions.DtException`.
12 |
--------------------------------------------------------------------------------
/docs/api/exceptions/ioerror.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xexc:: datatable.exceptions.IOError
3 | :src: --
4 |
5 | Raised during any IO operation, such as reading/writing CSV or Jay files.
6 | The most common cause for such an error is an invalid input file.
7 |
8 | Inherits from Python :py:exc:`IOError` and :exc:`datatable.exceptions.DtException`.
9 |
--------------------------------------------------------------------------------
/docs/api/exceptions/iowarning.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xexc:: datatable.exceptions.IOWarning
3 | :src: --
4 |
5 | This warning is raised whenever you read an input file and there are some
6 | irregularities in the input that we can recover from, but perhaps the user
7 | should be informed that something wasn't quite right.
8 |
--------------------------------------------------------------------------------
/docs/api/exceptions/keyerror.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xexc:: datatable.exceptions.KeyError
3 | :src: --
4 |
5 | Raised when accessing a column of a frame by name, but the name lookup
6 | fails to find such a column.
7 |
8 | Inherits from Python :py:exc:`KeyError` and :exc:`datatable.exceptions.DtException`.
9 |
--------------------------------------------------------------------------------
/docs/api/exceptions/memoryerror.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xexc:: datatable.exceptions.MemoryError
3 | :src: --
4 |
5 | This exception is raised whenever any operation fails to allocate the
6 | required amount of memory.
7 |
8 | Inherits from Python :py:exc:`MemoryError` and :exc:`datatable.exceptions.DtException`.
9 |
--------------------------------------------------------------------------------
/docs/api/exceptions/notimplementederror.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xexc:: datatable.exceptions.NotImplementedError
3 | :src: --
4 |
5 | Raised whenever an operation with given parameter values or input types
6 | is in theory valid, but hasn't been implemented yet.
7 |
8 | Inherits from Python :py:exc:`NotImplementedError` and :exc:`datatable.exceptions.DtException`.
9 |
--------------------------------------------------------------------------------
/docs/api/exceptions/overflowerror.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xexc:: datatable.exceptions.OverflowError
3 | :src: --
4 |
5 | Rare error that may occur if you pass a parameter that is too large to fit
6 | into C++ `int64` type, or sometimes larger than a `double`.
7 |
8 | Inherits from Python :py:exc:`OverflowError` and :exc:`datatable.exceptions.DtException`.
9 |
--------------------------------------------------------------------------------
/docs/api/exceptions/typeerror.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xexc:: datatable.exceptions.TypeError
3 | :src: --
4 |
5 | One of the most common exceptions raised by :mod:`datatable`, this occurs
6 | when either a function receives an argument of unexpected type, or incorrect
7 | number of arguments, or whenever an operation is requested on a column whose
8 | type is not suitable for that operation.
9 |
10 | Inherits from Python :py:exc:`TypeError` and :exc:`datatable.exceptions.DtException`.
11 |
--------------------------------------------------------------------------------
/docs/api/exceptions/valueerror.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xexc:: datatable.exceptions.ValueError
3 | :src: --
4 |
5 | Very common exception that occurs whenever an argument is passed to a
6 | function and that argument has the correct type, yet the value is
7 | not valid.
8 |
9 | Inherits from Python :py:exc:`ValueError` and :exc:`datatable.exceptions.DtException`.
10 |
--------------------------------------------------------------------------------
/docs/api/fexpr/__bool__.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.__bool__
3 | :src: src/core/expr/fexpr.cc PyFExpr::nb__bool__
4 |
5 | __bool__(self)
6 | --
7 |
8 | Using this operator will result in a ``TypeError``.
9 |
10 | The boolean-cast operator is used by Python whenever it wants to
11 | know whether the object is equivalent to a single ``True`` or ``False``
12 | value. This is not applicable for a :class:`dt.FExpr`, which represents
13 | *stored* computation on a *column* or multiple columns. As such, an
14 | error is raised.
15 |
16 | In order to convert a column into the boolean stype, you can use the
17 | type-cast operator ``dt.bool8(x)``.
18 |
--------------------------------------------------------------------------------
/docs/api/fexpr/__getitem__.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.__getitem__
3 | :src: src/core/expr/fexpr_slice.cc FExpr_Slice::evaluate_n
4 | :signature: __getitem__(self, selector)
5 |
6 | Apply a slice to the string column represented by this FExpr.
7 |
8 |
9 | Parameters
10 | ----------
11 | self: FExpr[str]
12 |
13 | selector: slice
14 | The slice will be applied to each value in the string column `self`.
15 |
16 | return: FExpr[str]
17 |
18 |
19 | Examples
20 | --------
21 | >>> DT = dt.Frame(season=["Winter", "Summer", "Autumn", "Spring"], i=[1, 2, 3, 4])
22 | >>> DT[:, {"start": f.season[:-f.i], "end": f.season[-f.i:]}]
23 | | start end
24 | | str32 str32
25 | -- + ----- -----
26 | 0 | Winte r
27 | 1 | Summ er
28 | 2 | Aut umn
29 | 3 | Sp ring
30 | [4 rows x 2 columns]
31 |
32 |
33 | See Also
34 | --------
35 | - :func:`dt.str.slice()` -- the equivalent function in :mod:`dt.str` module.
36 |
--------------------------------------------------------------------------------
/docs/api/fexpr/__init__.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.__init__
3 | :src: src/core/expr/fexpr.cc PyFExpr::m__init__
4 |
5 | __init__(self, e)
6 | --
7 |
8 | Create a new :class:`dt.FExpr` object out of ``e``.
9 |
10 | The ``FExpr`` serves as a simple wrapper of the underlying object,
11 | allowing it to be combined with othef ``FExpr``s.
12 |
13 | This constructor almost never needs to be run manually by the user.
14 |
15 |
16 | Parameters
17 | ----------
18 | e: None | bool | int | str | float | slice | list | tuple | dict | \
19 | type | stype | ltype | Generator | FExpr | Frame | range | \
20 | pd.DataFrame | pd.Series | np.array | np.ma.masked_array
21 | The argument that will be converted into an ``FExpr``.
22 |
23 |
--------------------------------------------------------------------------------
/docs/api/fexpr/__invert__.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.__invert__
3 | :src: src/core/expr/fexpr.cc PyFExpr::nb__invert__
4 |
5 | __invert__(x)
6 | --
7 |
8 | Compute bitwise NOT of `x`, which corresponds to python operation ``~x``.
9 |
10 | If `x` is a multi-column expressions, then the ``~`` operator will be
11 | applied to each column in turn.
12 |
13 | Bitwise NOT can only be applied to integer or boolean columns. The
14 | resulting column will have the same stype as its argument.
15 |
16 | When the argument `x` is a boolean column, then ``~x`` is equivalent to
17 | logical NOT. This can be used to negate a condition, similar to python
18 | operator ``not`` (which is not overloadable).
19 |
20 | Parameters
21 | ----------
22 | x: FExpr
23 | Either an `FExpr`, or any object that can be converted into `FExpr`.
24 |
25 | return: FExpr
26 | An expression that evaluates ``~x``.
27 |
28 |
29 | Notes
30 | -----
31 |
32 | .. note::
33 |
34 | Use ``~x`` in order to negate a boolean FExpr. Using standard Python
35 | keyword ``not`` will result in an error.
36 |
37 |
--------------------------------------------------------------------------------
/docs/api/fexpr/__mul__.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.__mul__
3 | :src: src/core/expr/fbinary/fexpr__mul__.cc evaluate1
4 | :tests: tests/expr/fbinary/test-mul.py
5 |
6 | __mul__(x, y)
7 | --
8 |
9 | Multiply two FExprs together, which corresponds to python operator `*`.
10 |
11 | If `x` or `y` are multi-column expressions, then they must have the
12 | same number of columns, and the `*` operator will be applied to each
13 | corresponding pair of columns. If either `x` or `y` are single-column
14 | while the other is multi-column, then the single-column expression
15 | will be repeated to the same number of columns as its opponent.
16 |
17 | The multiplication operation can only be applied to numeric columns. The
18 | resulting column will have stype equal to the larger of the stypes of its
19 | arguments, but at least ``int32``.
20 |
21 |
22 | Parameters
23 | ----------
24 | x, y: FExpr
25 | The arguments must be either `FExpr`s, or expressions that can be
26 | converted into `FExpr`s.
27 |
28 | return: FExpr
29 | An expression that evaluates `x * y`.
30 |
--------------------------------------------------------------------------------
/docs/api/fexpr/__neg__.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.__neg__
3 | :src: src/core/expr/fexpr.cc PyFExpr::nb__neg__
4 |
5 | __neg__(x)
6 | --
7 |
8 | Unary minus, which corresponds to python operation ``-x``.
9 |
10 | If `x` is a multi-column expressions, then the ``-`` operator will be
11 | applied to each column in turn.
12 |
13 | Unary minus can only be applied to numeric columns. The resulting column
14 | will have the same stype as its argument, but not less than ``int32``.
15 |
16 |
17 | Parameters
18 | ----------
19 | x: FExpr
20 | Either an `FExpr`, or any object that can be converted into `FExpr`.
21 |
22 | return: FExpr
23 | An expression that evaluates ``-x``.
24 |
--------------------------------------------------------------------------------
/docs/api/fexpr/__pos__.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.__pos__
3 | :src: src/core/expr/fexpr.cc PyFExpr::nb__pos__
4 |
5 | __pos__(x)
6 | --
7 |
8 | Unary plus, which corresponds to python operation ``+x``.
9 |
10 | If `x` is a multi-column expressions, then the ``+`` operator will be
11 | applied to each column in turn.
12 |
13 | Unary plus can only be applied to numeric columns. The resulting column
14 | will have the same stype as its argument, but not less than ``int32``.
15 |
16 |
17 | Parameters
18 | ----------
19 | x: FExpr
20 | Either an `FExpr`, or any object that can be converted into `FExpr`.
21 |
22 | return: FExpr
23 | An expression that evaluates ``+x``.
24 |
--------------------------------------------------------------------------------
/docs/api/fexpr/__pow__.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.__pow__
3 | :src: src/core/expr/fbinary/fexpr__pow__.cc evaluate1
4 | :tests: tests/expr/fbinary/test-pow.py
5 |
6 | __pow__(x, y)
7 | --
8 |
9 | Raise `x` to the power `y`, or in math notation :math:`x^y`.
10 |
11 | If `x` or `y` are multi-column expressions, then they must have the
12 | same number of columns, and the `**` operator will be applied to each
13 | corresponding pair of columns. If either `x` or `y` are single-column
14 | while the other is multi-column, then the single-column expression
15 | will be repeated to the same number of columns as its opponent.
16 |
17 | The power operator can only be applied to numeric columns, and the
18 | resulting column will have stype ``float64`` in all cases except when both
19 | arguments are ``float32`` (in which case the result is also ``float32``).
20 |
21 |
22 | Parameters
23 | ----------
24 | x, y: FExpr
25 | The arguments must be either `FExpr`s, or expressions that can be
26 | converted into `FExpr`s.
27 |
28 | return: FExpr
29 | An expression that evaluates `x ** y`.
30 |
--------------------------------------------------------------------------------
/docs/api/fexpr/__repr__.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.__repr__
3 | :src: src/core/expr/fexpr.cc PyFExpr::m__repr__
4 |
5 | __repr__(self)
6 | --
7 |
8 | Return string representation of this object. This method is used
9 | by Python's built-in function :ext-func:`repr()`.
10 |
11 | The returned string has the following format::
12 |
13 | >>> "FExpr<...>"
14 |
15 | where ``...`` will attempt to match the expression used to construct
16 | this ``FExpr``.
17 |
18 | Examples
19 | --------
20 | >>> repr(3 + 2*(f.A + f["B"]))
21 | "FExpr<3 + 2 * (f.A + f['B'])>"
22 |
--------------------------------------------------------------------------------
/docs/api/fexpr/__sub__.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.__sub__
3 | :src: src/core/expr/fbinary/fexpr__sub__.cc evaluate1
4 | :tests: tests/expr/fbinary/test-sub.py
5 |
6 | __sub__(x, y)
7 | --
8 |
9 | Subtract two FExprs, which corresponds to python operation ``x - y``.
10 |
11 | If `x` or `y` are multi-column expressions, then they must have the
12 | same number of columns, and the `-` operator will be applied to each
13 | corresponding pair of columns. If either `x` or `y` are single-column
14 | while the other is multi-column, then the single-column expression
15 | will be repeated to the same number of columns as its opponent.
16 |
17 | The subtraction operation can only be applied to numeric columns. The
18 | resulting column will have stype equal to the larger of the stypes of its
19 | arguments, but at least ``int32``.
20 |
21 |
22 | Parameters
23 | ----------
24 | x, y: FExpr
25 | The arguments must be either `FExpr`s, or expressions that can be
26 | converted into `FExpr`s.
27 |
28 | return: FExpr
29 | An expression that evaluates ``x - y``.
30 |
--------------------------------------------------------------------------------
/docs/api/fexpr/as_type.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.as_type
3 | :src: src/core/expr/fexpr.cc PyFExpr::as_type
4 | :cvar: doc_FExpr_as_type
5 | :signature: as_type(new_type)
6 |
7 | .. x-version-added:: 1.1.0
8 |
9 | Equivalent to :func:`dt.as_type(cols, new_type)`.
10 |
11 |
--------------------------------------------------------------------------------
/docs/api/fexpr/categories.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.categories
3 | :src: src/core/expr/fexpr.cc PyFExpr::categories
4 | :cvar: doc_FExpr_categories
5 | :signature: categories()
6 |
7 | Equivalent to :func:`dt.categories(cols)`.
8 |
--------------------------------------------------------------------------------
/docs/api/fexpr/codes.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.codes
3 | :src: src/core/expr/fexpr.cc PyFExpr::codes
4 | :cvar: doc_FExpr_codes
5 | :signature: codes()
6 |
7 | Equivalent to :func:`dt.codes(cols)`.
8 |
--------------------------------------------------------------------------------
/docs/api/fexpr/count.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.count
3 | :src: src/core/expr/fexpr.cc PyFExpr::count
4 | :cvar: doc_FExpr_count
5 | :signature: count()
6 |
7 | Equivalent to :func:`dt.count(cols)`.
8 |
--------------------------------------------------------------------------------
/docs/api/fexpr/countna.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.countna
3 | :src: src/core/expr/fexpr.cc PyFExpr::countna
4 | :cvar: doc_FExpr_countna
5 | :signature: countna()
6 |
7 | Equivalent to :func:`dt.countna(cols)`.
8 |
--------------------------------------------------------------------------------
/docs/api/fexpr/cummax.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.cummax
3 | :src: src/core/expr/fexpr.cc PyFExpr::cummax
4 | :cvar: doc_FExpr_cummax
5 | :signature: cummax()
6 |
7 | Equivalent to :func:`dt.cummax(cols)`.
8 |
--------------------------------------------------------------------------------
/docs/api/fexpr/cummin.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.cummin
3 | :src: src/core/expr/fexpr.cc PyFExpr::cummin
4 | :cvar: doc_FExpr_cummin
5 | :signature: cummin()
6 |
7 | Equivalent to :func:`dt.cummin(cols)`.
8 |
--------------------------------------------------------------------------------
/docs/api/fexpr/cumprod.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.cumprod
3 | :src: src/core/expr/fexpr.cc PyFExpr::cumprod
4 | :cvar: doc_FExpr_cumprod
5 | :signature: cumprod()
6 |
7 | Equivalent to :func:`dt.cumprod(cols)`.
8 |
9 |
--------------------------------------------------------------------------------
/docs/api/fexpr/cumsum.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.cumsum
3 | :src: src/core/expr/fexpr.cc PyFExpr::cumsum
4 | :cvar: doc_FExpr_cumsum
5 | :signature: cumsum()
6 |
7 | Equivalent to :func:`dt.cumsum(cols)`.
8 |
--------------------------------------------------------------------------------
/docs/api/fexpr/extend.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.extend
3 | :src: src/core/expr/fexpr.cc PyFExpr::extend
4 | :cvar: doc_FExpr_extend
5 | :signature: extend(self, arg)
6 |
7 | Append ``FExpr`` `arg` to the current FExpr.
8 |
9 | Each ``FExpr`` represents a collection of columns, or a columnset. This
10 | method takes two such columnsets and combines them into a single one,
11 | similar to :func:`cbind() `.
12 |
13 |
14 | Parameters
15 | ----------
16 | arg: FExpr
17 | The expression to append.
18 |
19 | return: FExpr
20 | New FExpr which is a combination of the current FExpr and `arg`.
21 |
22 |
23 | See also
24 | --------
25 | - :meth:`remove() ` -- remove columns from a columnset.
26 |
--------------------------------------------------------------------------------
/docs/api/fexpr/fillna.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.fillna
3 | :src: src/core/expr/fexpr.cc PyFExpr::fillna
4 | :cvar: doc_FExpr_fillna
5 | :signature: fillna(reverse=False)
6 |
7 | Equivalent to :func:`dt.fillna(cols, reverse=False)`.
8 |
--------------------------------------------------------------------------------
/docs/api/fexpr/first.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.first
3 | :src: src/core/expr/fexpr.cc PyFExpr::first
4 | :cvar: doc_FExpr_first
5 | :signature: first()
6 |
7 | Equivalent to :func:`dt.first(cols)`.
8 |
--------------------------------------------------------------------------------
/docs/api/fexpr/last.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.last
3 | :src: src/core/expr/fexpr.cc PyFExpr::last
4 | :cvar: doc_FExpr_last
5 | :signature: last()
6 |
7 | Equivalent to :func:`dt.last(cols)`.
8 |
--------------------------------------------------------------------------------
/docs/api/fexpr/len.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.len
3 | :src: --
4 | :signature: len(self)
5 |
6 | .. x-version-deprecated:: 0.11
7 |
8 | This method is deprecated and will be removed in version 1.1.0.
9 | Please use :func:`dt.str.len()` instead.
10 |
--------------------------------------------------------------------------------
/docs/api/fexpr/max.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.max
3 | :src: src/core/expr/fexpr.cc PyFExpr::max
4 | :cvar: doc_FExpr_max
5 | :signature: max()
6 |
7 | Equivalent to :func:`dt.max(cols)`.
8 |
--------------------------------------------------------------------------------
/docs/api/fexpr/mean.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.mean
3 | :src: src/core/expr/fexpr.cc PyFExpr::mean
4 | :cvar: doc_FExpr_mean
5 | :signature: mean()
6 |
7 | Equivalent to :func:`dt.mean(cols)`.
8 |
--------------------------------------------------------------------------------
/docs/api/fexpr/median.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.median
3 | :src: src/core/expr/fexpr.cc PyFExpr::median
4 | :cvar: doc_FExpr_median
5 | :signature: median()
6 |
7 | Equivalent to :func:`dt.median(cols)`.
8 |
--------------------------------------------------------------------------------
/docs/api/fexpr/min.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.min
3 | :src: src/core/expr/fexpr.cc PyFExpr::min
4 | :cvar: doc_FExpr_min
5 | :signature: min()
6 |
7 | Equivalent to :func:`dt.min(cols)`.
8 |
--------------------------------------------------------------------------------
/docs/api/fexpr/nunique.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.nunique
3 | :src: src/core/expr/fexpr.cc PyFExpr::nunique
4 | :cvar: doc_FExpr_nunique
5 | :signature: nunique()
6 |
7 | Equivalent to :func:`dt.nunique(cols)`.
8 |
--------------------------------------------------------------------------------
/docs/api/fexpr/prod.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.prod
3 | :src: src/core/expr/fexpr.cc PyFExpr::prod
4 | :cvar: doc_FExpr_prod
5 | :signature: prod()
6 |
7 | .. x-version-added:: 1.1.0
8 |
9 | Equivalent to :func:`dt.prod(cols)`.
10 |
11 |
--------------------------------------------------------------------------------
/docs/api/fexpr/re_match.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.re_match
3 | :src: --
4 | :signature: re_match(self, pattern)
5 |
6 | .. x-version-deprecated:: 1.0.0
7 |
8 | This method is deprecated and will be removed in version 1.1.0.
9 | Please use :func:`dt.re.match()` instead.
10 |
--------------------------------------------------------------------------------
/docs/api/fexpr/remove.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.remove
3 | :src: src/core/expr/fexpr.cc PyFExpr::remove
4 | :cvar: doc_FExpr_remove
5 | :signature: remove(self, arg)
6 |
7 | Remove columns `arg` from the current FExpr.
8 |
9 | Each ``FExpr`` represents a collection of columns, or a columnset. Some
10 | of those columns are computed while others are specified "by reference",
11 | for example ``f.A``, ``f[:3]`` or ``f[int]``. This method allows you to
12 | remove by-reference columns from an existing FExpr.
13 |
14 |
15 | Parameters
16 | ----------
17 | arg: FExpr
18 | The columns to remove. These must be "columns-by-reference", i.e.
19 | they cannot be computed columns.
20 |
21 | return: FExpr
22 | New FExpr which is a obtained from the current FExpr by removing
23 | the columns in `arg`.
24 |
25 |
26 | See also
27 | --------
28 | - :meth:`extend() ` -- append a columnset.
29 |
--------------------------------------------------------------------------------
/docs/api/fexpr/rowall.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.rowall
3 | :src: src/core/expr/fexpr.cc PyFExpr::rowall
4 | :cvar: doc_FExpr_rowall
5 | :signature: rowall()
6 |
7 | Equivalent to :func:`dt.rowall(*cols)`.
8 |
--------------------------------------------------------------------------------
/docs/api/fexpr/rowany.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.rowany
3 | :src: src/core/expr/fexpr.cc PyFExpr::rowany
4 | :cvar: doc_FExpr_rowany
5 | :signature: rowany()
6 |
7 | Equivalent to :func:`dt.rowany(*cols)`.
8 |
--------------------------------------------------------------------------------
/docs/api/fexpr/rowargmax.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.rowargmax
3 | :src: src/core/expr/fexpr.cc PyFExpr::rowargmax
4 | :cvar: doc_FExpr_rowargmax
5 | :signature: rowargmax()
6 |
7 | .. x-version-added:: 1.1.0
8 |
9 | Equivalent to :func:`dt.rowargmax(*cols)`.
10 |
--------------------------------------------------------------------------------
/docs/api/fexpr/rowargmin.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.rowargmin
3 | :src: src/core/expr/fexpr.cc PyFExpr::rowargmin
4 | :cvar: doc_FExpr_rowargmin
5 | :signature: rowargmin()
6 |
7 | .. x-version-added:: 1.1.0
8 |
9 | Equivalent to :func:`dt.rowargmin(*cols)`.
10 |
--------------------------------------------------------------------------------
/docs/api/fexpr/rowcount.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.rowcount
3 | :src: src/core/expr/fexpr.cc PyFExpr::rowcount
4 | :cvar: doc_FExpr_rowcount
5 | :signature: rowcount()
6 |
7 | Equivalent to :func:`dt.rowcount(*cols)`.
8 |
--------------------------------------------------------------------------------
/docs/api/fexpr/rowfirst.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.rowfirst
3 | :src: src/core/expr/fexpr.cc PyFExpr::rowfirst
4 | :cvar: doc_FExpr_rowfirst
5 | :signature: rowfirst()
6 |
7 | Equivalent to :func:`dt.rowfirst(*cols)`.
8 |
--------------------------------------------------------------------------------
/docs/api/fexpr/rowlast.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.rowlast
3 | :src: src/core/expr/fexpr.cc PyFExpr::rowlast
4 | :cvar: doc_FExpr_rowlast
5 | :signature: rowlast()
6 |
7 | Equivalent to :func:`dt.rowlast(*cols)`.
8 |
--------------------------------------------------------------------------------
/docs/api/fexpr/rowmax.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.rowmax
3 | :src: src/core/expr/fexpr.cc PyFExpr::rowmax
4 | :cvar: doc_FExpr_rowmax
5 | :signature: rowmax()
6 |
7 | Equivalent to :func:`dt.rowmax(*cols)`.
8 |
--------------------------------------------------------------------------------
/docs/api/fexpr/rowmean.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.rowmean
3 | :src: src/core/expr/fexpr.cc PyFExpr::rowmean
4 | :cvar: doc_FExpr_rowmean
5 | :signature: rowmean()
6 |
7 | Equivalent to :func:`dt.rowmean(*cols)`.
8 |
--------------------------------------------------------------------------------
/docs/api/fexpr/rowmin.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.rowmin
3 | :src: src/core/expr/fexpr.cc PyFExpr::rowmin
4 | :cvar: doc_FExpr_rowmin
5 | :signature: rowmin()
6 |
7 | Equivalent to :func:`dt.rowmin(*cols)`.
8 |
--------------------------------------------------------------------------------
/docs/api/fexpr/rowsd.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.rowsd
3 | :src: src/core/expr/fexpr.cc PyFExpr::rowsd
4 | :cvar: doc_FExpr_rowsd
5 | :signature: rowsd()
6 |
7 | Equivalent to :func:`dt.rowsd(*cols)`.
8 |
--------------------------------------------------------------------------------
/docs/api/fexpr/rowsum.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.rowsum
3 | :src: src/core/expr/fexpr.cc PyFExpr::rowsum
4 | :cvar: doc_FExpr_rowsum
5 | :signature: rowsum()
6 |
7 | Equivalent to :func:`dt.rowsum(*cols)`.
8 |
--------------------------------------------------------------------------------
/docs/api/fexpr/sd.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.sd
3 | :src: src/core/expr/fexpr.cc PyFExpr::sd
4 | :cvar: doc_FExpr_sd
5 | :signature: sd()
6 |
7 | Equivalent to :func:`dt.sd(cols)`.
8 |
--------------------------------------------------------------------------------
/docs/api/fexpr/shift.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.shift
3 | :src: src/core/expr/fexpr.cc PyFExpr::shift
4 | :cvar: doc_FExpr_shift
5 | :signature: shift(n=1)
6 |
7 | Equivalent to :func:`dt.shift(cols, n=1)`.
8 |
--------------------------------------------------------------------------------
/docs/api/fexpr/sum.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.FExpr.sum
3 | :src: src/core/expr/fexpr.cc PyFExpr::sum
4 | :cvar: doc_FExpr_sum
5 | :signature: sum()
6 |
7 | Equivalent to :func:`dt.sum(cols)`.
8 |
--------------------------------------------------------------------------------
/docs/api/frame/__copy__.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.__copy__
3 | :src: src/core/frame/py_frame.cc Frame::m__copy__
4 |
5 | This method facilitates copying of a Frame via the python standard module
6 | ``copy``. See :meth:`.copy()` for more details.
7 |
8 |
--------------------------------------------------------------------------------
/docs/api/frame/__getstate__.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.__getstate__
3 | :src: src/core/frame/__init__.cc Frame::m__getstate__
4 |
5 | This method allows the frame to be ``pickle``-able.
6 |
7 | Pickling a Frame involves saving it into a ``bytes`` object in Jay format,
8 | but may be less efficient than saving into a file directly because Python
9 | creates a copy of the data for the bytes object.
10 |
11 | See :meth:`.to_jay()` for more details and caveats about saving into Jay
12 | format.
13 |
--------------------------------------------------------------------------------
/docs/api/frame/__iter__.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.__iter__
3 | :src: src/core/frame/__iter__.cc Frame::m__iter__
4 |
5 | Returns an iterator over the frame's columns.
6 |
7 | The iterator is a light-weight object of type ``frame_iterator``,
8 | which yields consequent columns of the frame with each iteration.
9 |
10 | Thus, the iterator produces the sequence ``frame[0], frame[1],
11 | frame[2], ...`` until the end of the frame. This works even if
12 | the user adds or deletes columns in the frame while iterating.
13 | Be careful when inserting/deleting columns at an index that was
14 | already iterated over, as it will cause some columns to be
15 | skipped or visited more than once.
16 |
17 | This method is not intended for manual use. Instead, it is
18 | invoked by Python runtime either when you call :ext-func:`iter() `,
19 | or when you use the frame in a loop::
20 |
21 | >>> for column in frame:
22 | ... # column is a Frame of shape (frame.nrows, 1)
23 | ... ...
24 |
25 |
26 | See Also
27 | --------
28 | - :meth:`.__reversed__()`
29 |
--------------------------------------------------------------------------------
/docs/api/frame/__len__.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.__len__
3 | :src: src/core/frame/py_frame.cc Frame::m__len__
4 |
5 | Returns the number of columns in the Frame, same as :attr:`.ncols`
6 | property.
7 |
8 | This special method is used by the python built-in function
9 | ``len()``, and allows the :class:`dt.Frame` class to satisfy python
10 | ``Iterable`` interface.
11 |
--------------------------------------------------------------------------------
/docs/api/frame/__repr__.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.__repr__
3 | :src: src/core/frame/__repr__.cc Frame::m__repr__
4 |
5 | Returns a simple representation of the frame as a string. This
6 | method is used by Python's built-in function ``repr()``.
7 |
8 | The returned string has the following format::
9 |
10 | f""
11 |
12 | where ``{ID}`` is the value of ``id(frame)`` in hex format. Thus,
13 | each frame has its own unique id, though after one frame is
14 | deleted its id may be reused by another frame.
15 |
16 | See Also
17 | --------
18 | - :meth:`.__str__()`
19 |
--------------------------------------------------------------------------------
/docs/api/frame/__reversed__.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.__reversed__
3 | :src: src/core/frame/__iter__.cc Frame::m__reversed__
4 |
5 | Returns an iterator over the frame's columns in reverse order.
6 |
7 | This is similar to :meth:`.__iter__()`, except that the columns
8 | are returned in the reverse order, i.e. ``frame[-1]``, ``frame[-2]``,
9 | ``frame[-3]``, etc.
10 |
11 | This function is not intended for manual use. Instead, it is
12 | invoked by Python builtin function :ext-func:`reversed() `.
13 |
14 |
--------------------------------------------------------------------------------
/docs/api/frame/__str__.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.__str__
3 | :src: src/core/frame/__repr__.cc Frame::m__str__
4 |
5 | Returns a string with the Frame's data formatted as a table, i.e.
6 | the same representation as displayed when trying to inspect the
7 | frame from Python console.
8 |
9 | Different aspects of the stringification process can be controlled
10 | via ``dt.options.display`` options; but under the default settings
11 | the returned string will be sufficiently small to fit into a
12 | typical terminal window. If the frame has too many rows/columns,
13 | then only a small sample near the start+end of the frame will be
14 | rendered.
15 |
16 |
17 | See Also
18 | --------
19 | - :meth:`.__repr__()`
20 |
--------------------------------------------------------------------------------
/docs/api/frame/countna1.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.countna1
3 | :src: src/core/frame/stats.cc Frame::_init_stats
4 | :tests: tests/test-dt-stats.py
5 | :cvar: doc_Frame_countna1
6 | :signature: countna1(self)
7 |
8 | Return the number of NA values in a single-column Frame.
9 |
10 | This function is a shortcut for::
11 |
12 | DT.countna()[0, 0]
13 |
14 | Parameters
15 | ----------
16 | (except): ValueError
17 | If called on a Frame that has more or less than one column.
18 |
19 | (return): int
20 |
21 | See Also
22 | --------
23 | - :meth:`.countna()` -- similar to this method, but can be applied to
24 | a Frame with an arbitrary number of columns.
25 |
26 | - :func:`dt.count()` -- function for counting non-NA ("valid") values
27 | in a column; can also be applied per-group.
28 |
--------------------------------------------------------------------------------
/docs/api/frame/keys.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.keys
3 | :src: src/core/frame/names.cc Frame::get_names
4 |
5 | Returns a tuple of column names, same as :attr:`.names`
6 | property.
7 |
8 | This method is not intended for public use. It is needed in order
9 | for :class:`dt.Frame` to satisfy Python's ``Mapping`` interface.
10 |
--------------------------------------------------------------------------------
/docs/api/frame/kurt.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.kurt
3 | :src: src/core/frame/stats.cc Frame::_init_stats
4 | :tests: tests/test-dt-stats.py
5 | :cvar: doc_Frame_kurt
6 | :signature: kurt(self)
7 |
8 | Calculate the excess kurtosis for each column in the frame.
9 |
10 | Parameters
11 | ----------
12 | return: Frame
13 | The frame will have one row and the same number/names
14 | of columns as in the current frame. All the columns
15 | will have `float64` stype. For non-numeric columns
16 | this function returns NA values.
17 |
18 | See Also
19 | --------
20 | - :meth:`.kurt1()` -- similar to this method, but operates on a
21 | single-column frame only, and returns a scalar value instead of
22 | a Frame.
23 |
--------------------------------------------------------------------------------
/docs/api/frame/kurt1.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.kurt1
3 | :src: src/core/frame/stats.cc Frame::_init_stats
4 | :tests: tests/test-dt-stats.py
5 | :cvar: doc_Frame_kurt1
6 | :signature: kurt1(self)
7 |
8 | Calculate the excess kurtosis for a one-column frame and
9 | return it as a scalar.
10 |
11 | This function is a shortcut for::
12 |
13 | DT.kurt()[0, 0]
14 |
15 | Parameters
16 | ----------
17 | return: None | float
18 | `None` is returned for non-numeric columns.
19 |
20 | except: ValueError
21 | If called on a Frame that has more or less than one column.
22 |
23 | See Also
24 | --------
25 | - :meth:`.kurt()` -- similar to this method, but can be applied to
26 | a Frame with an arbitrary number of columns.
27 |
--------------------------------------------------------------------------------
/docs/api/frame/ltypes.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Frame.ltypes
3 | :src: src/core/frame/py_frame.cc Frame::get_ltypes
4 | :cvar: doc_Frame_ltypes
5 |
6 | .. x-version-deprecated:: 1.0.0
7 |
8 | This property is deprecated and will be removed in version 1.2.0.
9 | Please use :attr:`.types` instead.
10 |
11 | The tuple of each column's ltypes ("logical types").
12 |
13 | Parameters
14 | ----------
15 | return: Tuple[ltype, ...]
16 | The length of the tuple is the same as the number of columns in
17 | the frame.
18 |
19 | See also
20 | --------
21 | - :attr:`.stypes` -- tuple of columns' storage types
22 |
--------------------------------------------------------------------------------
/docs/api/frame/max.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.max
3 | :src: src/core/frame/stats.cc Frame::_init_stats
4 | :tests: tests/test-dt-stats.py
5 | :cvar: doc_Frame_max
6 | :signature: max(self)
7 |
8 | Find the largest value in each column of the frame.
9 |
10 | Parameters
11 | ----------
12 | return: Frame
13 | The frame will have one row and the same number, names and stypes
14 | of columns as in the current frame. For string/object columns
15 | this function returns NA values.
16 |
17 | See Also
18 | --------
19 | - :meth:`.max1()` -- similar to this method, but operates on a
20 | single-column frame only, and returns a scalar value instead of
21 | a Frame.
22 |
23 | - :func:`dt.max()` -- function for finding largest values in a column or
24 | an expression; can also be applied per-group.
25 |
--------------------------------------------------------------------------------
/docs/api/frame/max1.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.max1
3 | :src: src/core/frame/stats.cc Frame::_init_stats
4 | :tests: tests/test-dt-stats.py
5 | :cvar: doc_Frame_max1
6 | :signature: max1(self)
7 |
8 | Return the largest value in a single-column Frame. The frame's
9 | stype must be numeric.
10 |
11 | This function is a shortcut for::
12 |
13 | DT.max()[0, 0]
14 |
15 | Parameters
16 | ----------
17 | return: bool | int | float
18 | The returned value corresponds to the stype of the frame.
19 |
20 | except: ValueError
21 | If called on a Frame that has more or less than one column.
22 |
23 | See Also
24 | --------
25 | - :meth:`.max()` -- similar to this method, but can be applied to
26 | a Frame with an arbitrary number of columns.
27 |
28 | - :func:`dt.max()` -- function for counting max values in a column or
29 | an expression; can also be applied per-group.
30 |
--------------------------------------------------------------------------------
/docs/api/frame/mean.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.mean
3 | :src: src/core/frame/stats.cc Frame::_init_stats
4 | :tests: tests/test-dt-stats.py
5 | :cvar: doc_Frame_mean
6 | :signature: mean(self)
7 |
8 | Calculate the mean value for each column in the frame.
9 |
10 | Parameters
11 | ----------
12 | return: Frame
13 | The frame will have one row and the same number/names
14 | of columns as in the current frame. All columns will have `float64`
15 | stype. For string/object columns this function returns NA values.
16 |
17 | See Also
18 | --------
19 | - :meth:`.mean1()` -- similar to this method, but operates on a
20 | single-column frame only, and returns a scalar value instead of
21 | a Frame.
22 |
23 | - :func:`dt.mean()` -- function for counting mean values in a column or
24 | an expression; can also be applied per-group.
25 |
--------------------------------------------------------------------------------
/docs/api/frame/mean1.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.mean1
3 | :src: src/core/frame/stats.cc Frame::_init_stats
4 | :tests: tests/test-dt-stats.py
5 | :cvar: doc_Frame_mean1
6 | :signature: mean1(self)
7 |
8 | Calculate the mean value for a single-column Frame.
9 |
10 | This function is a shortcut for::
11 |
12 | DT.mean()[0, 0]
13 |
14 | Parameters
15 | ----------
16 | return: None | float
17 | `None` is returned for string/object columns.
18 |
19 | except: ValueError
20 | If called on a Frame that has more or less than one column.
21 |
22 | See Also
23 | --------
24 | - :meth:`.mean()` -- similar to this method, but can be applied to
25 | a Frame with an arbitrary number of columns.
26 |
27 | - :func:`dt.mean()` -- function for calculatin mean values in a column or
28 | an expression; can also be applied per-group.
29 |
--------------------------------------------------------------------------------
/docs/api/frame/meta.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Frame.meta
3 | :src: src/core/frame/py_frame.cc Frame::get_meta Frame::set_meta
4 | :settable: new_meta
5 | :cvar: doc_Frame_meta
6 |
7 | .. x-version-added:: 1.0
8 |
9 | Frame's meta information.
10 |
11 | This property contains meta information, if any, as set by datatable
12 | functions and methods. It is a settable property, so that users can also
13 | update it with any information relevant to a particular frame.
14 |
15 | It is not guaranteed that the existing meta information will be preserved
16 | by the functions and methods called on the frame. In particular,
17 | it is not preserved when exporting data into a Jay file or pickling the data.
18 | This behavior may change in the future.
19 |
20 | The default value for this property is `None`.
21 |
22 |
23 | Parameters
24 | ----------
25 | return: dict | None
26 | If the frame carries any meta information, the corresponding meta
27 | information dictionary is returned, `None` is returned otherwise.
28 |
29 | new_meta: dict | None
30 | New meta information.
31 |
--------------------------------------------------------------------------------
/docs/api/frame/min.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.min
3 | :src: src/core/frame/stats.cc Frame::_init_stats
4 | :tests: tests/test-dt-stats.py
5 | :cvar: doc_Frame_min
6 | :signature: min(self)
7 |
8 | Find the smallest value in each column of the frame.
9 |
10 | Parameters
11 | ----------
12 | return: Frame
13 | The frame will have one row and the same number, names and stypes
14 | of columns as in the current frame. For string/object columns
15 | this function returns NA values.
16 |
17 | See Also
18 | --------
19 | - :meth:`.min1()` -- similar to this method, but operates on a
20 | single-column frame only, and returns a scalar value instead of
21 | a Frame.
22 |
23 | - :func:`dt.min()` -- function for counting min values in a column or
24 | an expression; can also be applied per-group.
25 |
--------------------------------------------------------------------------------
/docs/api/frame/min1.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.min1
3 | :src: src/core/frame/stats.cc Frame::_init_stats
4 | :tests: tests/test-dt-stats.py
5 | :cvar: doc_Frame_min1
6 | :signature: min1(self)
7 |
8 | Find the smallest value in a single-column Frame. The frame's
9 | stype must be numeric.
10 |
11 | This function is a shortcut for::
12 |
13 | DT.min()[0, 0]
14 |
15 | Parameters
16 | ----------
17 | return: bool | int | float
18 | The returned value corresponds to the stype of the frame.
19 |
20 | except: ValueError
21 | If called on a Frame that has more or less than 1 column.
22 |
23 | See Also
24 | --------
25 | - :meth:`.min()` -- similar to this method, but can be applied to
26 | a Frame with an arbitrary number of columns.
27 |
28 | - :func:`dt.min()` -- function for counting min values in a column or
29 | an expression; can also be applied per-group.
30 |
--------------------------------------------------------------------------------
/docs/api/frame/mode.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.mode
3 | :src: src/core/frame/stats.cc Frame::_init_stats
4 | :tests: tests/test-dt-stats.py
5 | :cvar: doc_Frame_mode
6 | :signature: mode(self)
7 |
8 | Find the mode for each column in the frame.
9 |
10 | Parameters
11 | ----------
12 | return: Frame
13 | The frame will have one row and the same number/names
14 | of columns as in the current frame.
15 |
16 | See Also
17 | --------
18 | - :meth:`.mode1()` -- similar to this method, but operates on a
19 | single-column frame only, and returns a scalar value instead of
20 | a Frame.
21 |
--------------------------------------------------------------------------------
/docs/api/frame/mode1.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.mode1
3 | :src: src/core/frame/stats.cc Frame::_init_stats
4 | :tests: tests/test-dt-stats.py
5 | :cvar: doc_Frame_mode1
6 | :signature: mode1(self)
7 |
8 | Find the mode for a single-column Frame.
9 |
10 | This function is a shortcut for::
11 |
12 | DT.mode()[0, 0]
13 |
14 | Parameters
15 | ----------
16 | return: bool | int | float | str | object
17 | The returned value corresponds to the stype of the column.
18 |
19 | except: ValueError
20 | If called on a Frame that has more or less than one column.
21 |
22 | See Also
23 | --------
24 | - :meth:`.mode()` -- similar to this method, but can be applied to
25 | a Frame with an arbitrary number of columns.
26 |
27 |
--------------------------------------------------------------------------------
/docs/api/frame/ncols.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Frame.ncols
3 | :src: src/core/frame/py_frame.cc Frame::get_ncols
4 | :cvar: doc_Frame_ncols
5 |
6 | Number of columns in the frame.
7 |
8 | Parameters
9 | ----------
10 | return: int
11 | The number of columns can be either zero or a positive integer.
12 |
13 | Notes
14 | -----
15 | The expression `len(DT)` also returns the number of columns in the
16 | frame `DT`. Such usage, however, is not recommended.
17 |
18 | See also
19 | --------
20 | - :attr:`.nrows`: getter for the number of rows of the frame.
21 |
--------------------------------------------------------------------------------
/docs/api/frame/nmodal.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.nmodal
3 | :src: src/core/frame/stats.cc Frame::_init_stats
4 | :tests: tests/test-dt-stats.py
5 | :cvar: doc_Frame_nmodal
6 | :signature: nmodal(self)
7 |
8 | Calculate the modal frequency for each column in the frame.
9 |
10 | Parameters
11 | ----------
12 | return: Frame
13 | The frame will have one row and the same number/names
14 | of columns as in the current frame. All the columns
15 | will have `int64` stype.
16 |
17 | See Also
18 | --------
19 | - :meth:`.nmodal1()` -- similar to this method, but operates on a
20 | single-column frame only, and returns a scalar value instead of
21 | a Frame.
22 |
--------------------------------------------------------------------------------
/docs/api/frame/nmodal1.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.nmodal1
3 | :src: src/core/frame/stats.cc Frame::_init_stats
4 | :tests: tests/test-dt-stats.py
5 | :cvar: doc_Frame_nmodal1
6 | :signature: nmodal1(self)
7 |
8 | Calculate the modal frequency for a single-column Frame.
9 |
10 | This function is a shortcut for::
11 |
12 | DT.nmodal()[0, 0]
13 |
14 | Parameters
15 | ----------
16 | return: int
17 |
18 | except: ValueError
19 | If called on a Frame that has more or less than one column.
20 |
21 | See Also
22 | --------
23 | - :meth:`.nmodal()` -- similar to this method, but can be applied to
24 | a Frame with an arbitrary number of columns.
25 |
--------------------------------------------------------------------------------
/docs/api/frame/nrows.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Frame.nrows
3 | :src: src/core/frame/py_frame.cc Frame::get_nrows Frame::set_nrows
4 | :cvar: doc_Frame_nrows
5 | :settable: n
6 |
7 | Number of rows in the Frame.
8 |
9 | Assigning to this property will change the height of the Frame,
10 | either by truncating if the new number of rows is smaller than the
11 | current, or filling with NAs if the new number of rows is greater.
12 |
13 | Increasing the number of rows of a keyed Frame is not allowed.
14 |
15 | Parameters
16 | ----------
17 | return: int
18 | The number of rows can be either zero or a positive integer.
19 |
20 | n: int
21 | The new number of rows for the frame, this should be a non-negative
22 | integer.
23 |
24 | See also
25 | --------
26 | - :attr:`.ncols`: getter for the number of columns of the frame.
27 |
--------------------------------------------------------------------------------
/docs/api/frame/nunique.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.nunique
3 | :src: src/core/frame/stats.cc Frame::_init_stats
4 | :tests: tests/test-dt-stats.py
5 | :cvar: doc_Frame_nunique
6 | :signature: nunique(self)
7 |
8 | Count the number of unique values for each column in the frame.
9 |
10 | Parameters
11 | ----------
12 | return: Frame
13 | The frame will have one row and the same number/names
14 | of columns as in the current frame. All the columns
15 | will have `int64` stype.
16 |
17 | See Also
18 | --------
19 | - :meth:`.nunique1()` -- similar to this method, but operates on a
20 | single-column frame only, and returns a scalar value instead of
21 | a Frame.
22 |
--------------------------------------------------------------------------------
/docs/api/frame/nunique1.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.nunique1
3 | :src: src/core/frame/stats.cc Frame::_init_stats
4 | :tests: tests/test-dt-stats.py
5 | :cvar: doc_Frame_nunique1
6 | :signature: nunique1(self)
7 |
8 | Count the number of unique values for a one-column frame and return it as a scalar.
9 |
10 | This function is a shortcut for::
11 |
12 | DT.nunique()[0, 0]
13 |
14 | Parameters
15 | ----------
16 | return: int
17 |
18 | except: ValueError
19 | If called on a Frame that has more or less than one column.
20 |
21 | See Also
22 | --------
23 | - :meth:`.nunique()` -- similar to this method, but can be applied to
24 | a Frame with an arbitrary number of columns.
25 |
--------------------------------------------------------------------------------
/docs/api/frame/sd.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.sd
3 | :src: src/core/frame/stats.cc Frame::_init_stats
4 | :tests: tests/test-dt-stats.py
5 | :cvar: doc_Frame_sd
6 | :signature: sd(self)
7 |
8 | Calculate the standard deviation for each column in the frame.
9 |
10 | Parameters
11 | ----------
12 | return: Frame
13 | The frame will have one row and the same number/names
14 | of columns as in the current frame. All the columns
15 | will have `float64` stype. For non-numeric columns
16 | this function returns NA values.
17 |
18 | See Also
19 | --------
20 | - :meth:`.sd1()` -- similar to this method, but operates on a
21 | single-column frame only, and returns a scalar value instead of
22 | a Frame.
23 |
24 |
25 | - :func:`dt.sd()` -- function for calculating the standard deviation
26 | in a column or an expression; can also be applied per-group.
27 |
28 |
--------------------------------------------------------------------------------
/docs/api/frame/sd1.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.sd1
3 | :src: src/core/frame/stats.cc Frame::_init_stats
4 | :tests: tests/test-dt-stats.py
5 | :cvar: doc_Frame_sd1
6 | :signature: sd1(self)
7 |
8 | Calculate the standard deviation for a one-column frame and
9 | return it as a scalar.
10 |
11 | This function is a shortcut for::
12 |
13 | DT.sd()[0, 0]
14 |
15 | Parameters
16 | ----------
17 | return: None | float
18 | `None` is returned for non-numeric columns.
19 |
20 | except: ValueError
21 | If called on a Frame that has more or less than one column.
22 |
23 | See Also
24 | --------
25 | - :meth:`.sd()` -- similar to this method, but can be applied to
26 | a Frame with an arbitrary number of columns.
27 |
28 | - :func:`dt.sd()` -- function for calculating the standard deviation
29 | in a column or an expression; can also be applied per-group.
30 |
--------------------------------------------------------------------------------
/docs/api/frame/shape.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Frame.shape
3 | :src: src/core/frame/py_frame.cc Frame::get_shape
4 | :cvar: doc_Frame_shape
5 |
6 | Tuple with ``(nrows, ncols)`` dimensions of the frame.
7 |
8 | This property is read-only.
9 |
10 | Parameters
11 | ----------
12 | return: Tuple[int, int]
13 | Tuple with two integers: the first is the number of rows, the
14 | second is the number of columns.
15 |
16 | See also
17 | --------
18 | - :attr:`.nrows` -- getter for the number of rows;
19 | - :attr:`.ncols` -- getter for the number of columns.
20 |
21 |
--------------------------------------------------------------------------------
/docs/api/frame/skew.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.skew
3 | :src: src/core/frame/stats.cc Frame::_init_stats
4 | :tests: tests/test-dt-stats.py
5 | :cvar: doc_Frame_skew
6 | :signature: skew(self)
7 |
8 | Calculate the skewness for each column in the frame.
9 |
10 | Parameters
11 | ----------
12 | return: Frame
13 | The frame will have one row and the same number/names
14 | of columns as in the current frame. All the columns
15 | will have `float64` stype. For non-numeric columns
16 | this function returns NA values.
17 |
18 | See Also
19 | --------
20 | - :meth:`.skew1()` -- similar to this method, but operates on a
21 | single-column frame only, and returns a scalar value instead of
22 | a Frame.
23 |
--------------------------------------------------------------------------------
/docs/api/frame/skew1.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.skew1
3 | :src: src/core/frame/stats.cc Frame::_init_stats
4 | :tests: tests/test-dt-stats.py
5 | :cvar: doc_Frame_skew1
6 | :signature: skew1(self)
7 |
8 | Calculate the skewness for a one-column frame and return it as a scalar.
9 |
10 | This function is a shortcut for::
11 |
12 | DT.skew()[0, 0]
13 |
14 | Parameters
15 | ----------
16 | return: None | float
17 | `None` is returned for non-numeric columns.
18 |
19 | except: ValueError
20 | If called on a Frame that has more or less than one column.
21 |
22 | See Also
23 | --------
24 | - :meth:`.skew()` -- similar to this method, but can be applied to
25 | a Frame with an arbitrary number of columns.
26 |
--------------------------------------------------------------------------------
/docs/api/frame/sort.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.sort
3 | :src: src/core/sort.cc py::Frame::sort
4 | :cvar: doc_Frame_sort
5 | :signature: sort(self, *cols)
6 |
7 | Sort frame by the specified column(s).
8 |
9 |
10 | Parameters
11 | ----------
12 | cols: List[str | int]
13 | Names or indices of the columns to sort by. If no columns are
14 | given, the Frame will be sorted on all columns.
15 |
16 | return: Frame
17 | New Frame sorted by the provided column(s). The current frame
18 | remains unmodified.
19 |
--------------------------------------------------------------------------------
/docs/api/frame/stype.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Frame.stype
3 | :src: src/core/frame/py_frame.cc Frame::get_stype
4 | :cvar: doc_Frame_stype
5 |
6 | .. x-version-deprecated:: 1.0.0
7 |
8 | This property is deprecated and will be removed in version 1.2.0.
9 | Please use :attr:`.types` instead.
10 |
11 | .. x-version-added:: 0.10.0
12 |
13 | The common :class:`dt.stype` for all columns.
14 |
15 | This property is well-defined only for frames where all columns have
16 | the same stype.
17 |
18 | Parameters
19 | ----------
20 | return: stype | None
21 | For frames where all columns have the same stype, this common
22 | stype is returned. If a frame has 0 columns, `None` will be
23 | returned.
24 |
25 | except: InvalidOperationError
26 | This exception will be raised if the columns in the frame have
27 | different stypes.
28 |
29 | See also
30 | --------
31 | - :attr:`.stypes` -- tuple of stypes for all columns.
32 |
--------------------------------------------------------------------------------
/docs/api/frame/stypes.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Frame.stypes
3 | :src: src/core/frame/py_frame.cc Frame::get_stypes
4 | :cvar: doc_Frame_stypes
5 |
6 | .. x-version-deprecated:: 1.0.0
7 |
8 | This property is deprecated and will be removed in version 1.2.0.
9 | Please use :attr:`.types` instead.
10 |
11 | The tuple of each column's stypes ("storage types").
12 |
13 | Parameters
14 | ----------
15 | return: Tuple[stype, ...]
16 | The length of the tuple is the same as the number of columns in
17 | the frame.
18 |
19 | See also
20 | --------
21 | - :attr:`.stype` -- common stype for all columns
22 | - :attr:`.ltypes` -- tuple of columns' logical types
23 |
--------------------------------------------------------------------------------
/docs/api/frame/sum1.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.sum1
3 | :src: src/core/frame/stats.cc Frame::_init_stats
4 | :tests: tests/test-dt-stats.py
5 | :cvar: doc_Frame_sum1
6 | :signature: sum1(self)
7 |
8 | Calculate the sum of all values for a one-column column frame and
9 | return it as a scalar.
10 |
11 | This function is a shortcut for::
12 |
13 | DT.sum()[0, 0]
14 |
15 | Parameters
16 | ----------
17 | return: None | float
18 | `None` is returned for non-numeric columns.
19 |
20 | except: ValueError
21 | If called on a Frame that has more or less than one column.
22 |
23 | See Also
24 | --------
25 | - :meth:`.sum()` -- similar to this method, but can be applied to
26 | a Frame with an arbitrary number of columns.
27 |
28 | - :func:`dt.sum()` -- function for calculating the sum of all the values
29 | in a column or an expression; can also be applied per-group.
30 |
31 |
--------------------------------------------------------------------------------
/docs/api/frame/to_arrow.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.to_arrow
3 | :src: src/core/frame/to_arrow.cc Frame::to_arrow
4 | :tests: tests/frame/test-to-arrow.py
5 | :cvar: doc_Frame_to_arrow
6 | :signature: to_arrow(self)
7 |
8 | Convert this frame into a ``pyarrow.Table`` object. The ``pyarrow``
9 | module must be installed.
10 |
11 | The conversion is multi-threaded and done in C++, but it does
12 | involve creating a copy of the data, except for the cases when the
13 | data was originally imported from Arrow. This is caused by differences
14 | in the data storage formats of datatable and Arrow.
15 |
16 | Parameters
17 | ----------
18 | return: pyarrow.Table
19 | A ``Table`` object is always returned, even if the source is a
20 | single-column datatable Frame.
21 |
22 | except: ImportError
23 | If the `pyarrow` module is not installed.
24 |
--------------------------------------------------------------------------------
/docs/api/frame/to_dict.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.to_dict
3 | :src: src/core/frame/to_python.cc Frame::to_dict
4 | :cvar: doc_Frame_to_dict
5 | :signature: to_dict(self)
6 |
7 | Convert the frame into a dictionary of lists, by columns.
8 |
9 | The order of records in the dictionary will be the
10 | same as the order of columns in the frame.
11 |
12 | Parameters
13 | ----------
14 | return: Dict[str, List]
15 | Dictionary with :attr:`.ncols` records. Each record
16 | represents a single column: the key is the column's name, and the
17 | value is the list with the column's data.
18 |
19 | Examples
20 | --------
21 | >>> DT = dt.Frame(A=[1, 2, 3], B=["aye", "nay", "tain"])
22 | >>> DT.to_dict()
23 | {"A": [1, 2, 3], "B": ["aye", "nay", "tain"]}
24 |
25 | See also
26 | --------
27 | - :meth:`.to_list`: convert the frame into a list of lists
28 | - :meth:`.to_tuples`: convert the frame into a list of tuples by rows
29 |
--------------------------------------------------------------------------------
/docs/api/frame/to_jay.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.to_jay
3 | :src: src/core/jay/save_jay.cc Frame::to_jay
4 | :cvar: doc_Frame_to_jay
5 | :signature: to_jay(self, path=None, method='auto')
6 |
7 | Save this frame to a binary file on disk, in `.jay` format.
8 |
9 | Parameters
10 | ----------
11 | path: str | None
12 | The destination file name. Although not necessary, we recommend
13 | using extension ".jay" for the file. If the file exists, it will
14 | be overwritten.
15 | If this argument is omitted, the file will be created in memory
16 | instead, and returned as a `bytes` object.
17 |
18 | method: 'mmap' | 'write' | 'auto'
19 | Which method to use for writing the file to disk. The "write"
20 | method is more portable across different operating systems, but
21 | may be slower. This parameter has no effect when `path` is
22 | omitted.
23 |
24 | return: None | bytes
25 | If the `path` parameter is given, this method returns nothing.
26 | However, if `path` was omitted, the return value is a `bytes`
27 | object containing encoded frame's data.
28 |
--------------------------------------------------------------------------------
/docs/api/frame/to_list.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.to_list
3 | :src: src/core/frame/to_python.cc Frame::to_list
4 | :cvar: doc_Frame_to_list
5 | :signature: to_list(self)
6 |
7 | Convert the frame into a list of lists, by columns.
8 |
9 |
10 | Parameters
11 | ----------
12 | return: List[List]
13 | A list of :attr:`.ncols` lists, each inner list
14 | representing one column of the frame.
15 |
16 |
17 | Examples
18 | --------
19 | >>> DT = dt.Frame(A=[1, 2, 3], B=["aye", "nay", "tain"])
20 | >>> DT.to_list()
21 | [[1, 2, 3], ["aye", "nay", "tain"]]
22 |
23 | >>> dt.Frame(id=range(10)).to_list()
24 | [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]]
25 |
--------------------------------------------------------------------------------
/docs/api/frame/to_pandas.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.to_pandas
3 | :src: src/core/frame/to_pandas.cc Frame::to_pandas
4 | :tests: tests/frame/test-to-pandas.py
5 | :cvar: doc_Frame_to_pandas
6 | :signature: to_pandas(self)
7 |
8 | Convert this frame into a pandas DataFrame.
9 |
10 | If the frame being converted has one or more key columns, those
11 | columns will become the index in the pandas DataFrame.
12 |
13 | Parameters
14 | ----------
15 | return: pandas.DataFrame
16 | Pandas dataframe of shape ``(nrows, ncols-nkeys)``.
17 |
18 | except: ImportError
19 | If the `pandas` module is not installed.
20 |
--------------------------------------------------------------------------------
/docs/api/frame/to_tuples.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.to_tuples
3 | :src: src/core/frame/to_python.cc Frame::to_tuples
4 | :cvar: doc_Frame_to_tuples
5 | :signature: to_tuples(self)
6 |
7 | Convert the frame into a list of tuples, by rows.
8 |
9 | Parameters
10 | ----------
11 | return: List[Tuple]
12 | Returns a list having :attr:`.nrows` tuples, where
13 | each tuple has length :attr:`.ncols` and contains data
14 | from each respective row of the frame.
15 |
16 | Examples
17 | --------
18 | >>> DT = dt.Frame(A=[1, 2, 3], B=["aye", "nay", "tain"])
19 | >>> DT.to_tuples()
20 | [(1, "aye"), (2, "nay"), (3, "tain")]
21 |
--------------------------------------------------------------------------------
/docs/api/frame/type.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Frame.type
3 | :src: src/core/frame/py_frame.cc Frame::get_type
4 | :cvar: doc_Frame_type
5 |
6 | .. x-version-added:: v1.0.0
7 |
8 | The common :class:`dt.Type` for all columns.
9 |
10 | This property is well-defined only for frames where all columns have
11 | the same type.
12 |
13 | Parameters
14 | ----------
15 | return: Type | None
16 | For frames where all columns have the same type, this common
17 | type is returned. If a frame has 0 columns, `None` will be
18 | returned.
19 |
20 | except: InvalidOperationError
21 | This exception will be raised if the columns in the frame have
22 | different types.
23 |
24 | See also
25 | --------
26 | - :attr:`.types` -- list of types for all columns.
27 |
--------------------------------------------------------------------------------
/docs/api/frame/types.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Frame.types
3 | :src: src/core/frame/py_frame.cc Frame::get_types
4 | :cvar: doc_Frame_types
5 |
6 | .. x-version-added:: v1.0.0
7 |
8 | The list of `Type`s for each column of the frame.
9 |
10 | Parameters
11 | ----------
12 | return: List[Type]
13 | The length of the list is the same as the number of columns in the frame.
14 |
15 |
16 | See also
17 | --------
18 | - :attr:`.type` -- common type for all columns
19 |
--------------------------------------------------------------------------------
/docs/api/frame/view.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Frame.view
3 | :src: src/core/frame/__repr__.cc Frame::view
4 | :cvar: doc_Frame_view
5 | :signature: view(self, interactive=None, plain=False)
6 |
7 | .. warning::
8 |
9 | This function is currently not working properly.
10 | `[#2669] `_
11 |
--------------------------------------------------------------------------------
/docs/api/internal.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xpy:module:: datatable.internal
3 |
4 | datatable.internal
5 | ==================
6 |
7 | .. warning::
8 |
9 | The functions in this sub-module are considered to be "internal" and
10 | not useful for day-to-day work with :mod:`datatable` module.
11 |
12 | .. list-table::
13 | :widths: auto
14 | :class: api-table
15 |
16 | * - :func:`frame_column_data_r()`
17 | - C pointer to column's data
18 |
19 | * - :func:`frame_columns_virtual()`
20 | - Indicators of which columns in the frame are virtual.
21 |
22 | * - :func:`frame_integrity_check()`
23 | - Run checks on whether the frame's state is corrupted.
24 |
25 | * - :func:`get_thread_ids()`
26 | - Get ids of threads spawned by datatable.
27 |
28 |
29 |
30 | .. toctree::
31 | :hidden:
32 |
33 | frame_column_data_r()
34 | frame_columns_virtual()
35 | frame_integrity_check()
36 | get_thread_ids()
37 |
--------------------------------------------------------------------------------
/docs/api/internal/frame_column_data_r.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.internal.frame_column_data_r
3 | :src: src/core/datatablemodule.cc frame_column_data_r
4 | :cvar: doc_internal_frame_column_data_r
5 | :signature: frame_column_data_r(frame, i)
6 |
7 | Return C pointer to the main data array of the column `frame[i]`.
8 | The column will be materialized if it was virtual.
9 |
10 |
11 | Parameters
12 | ----------
13 | frame: Frame
14 | The :class:`dt.Frame` where to look up the column.
15 |
16 | i: int
17 | The index of a column, in the range ``[0; ncols)``.
18 |
19 | return: ctypes.c_void_p
20 | The pointer to the column's internal data.
21 |
--------------------------------------------------------------------------------
/docs/api/internal/frame_columns_virtual.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.internal.frame_columns_virtual
3 | :src: src/core/datatablemodule.cc frame_columns_virtual
4 | :cvar: doc_internal_frame_columns_virtual
5 | :signature: frame_columns_virtual(frame)
6 |
7 | .. x-version-deprecated:: 0.11.0
8 |
9 | Return the list indicating which columns in the `frame` are virtual.
10 |
11 | Parameters
12 | ----------
13 | return: List[bool]
14 | Each element in the list indicates whether the corresponding column
15 | is virtual or not.
16 |
17 | Notes
18 | -----
19 |
20 | This function will be expanded and moved into the main :class:`dt.Frame` class.
21 |
--------------------------------------------------------------------------------
/docs/api/internal/frame_integrity_check.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.internal.frame_integrity_check
3 | :src: src/core/datatablemodule.cc frame_integrity_check
4 | :cvar: doc_internal_frame_integrity_check
5 | :signature: frame_integrity_check(frame)
6 |
7 | This function performs a range of tests on the `frame` to verify
8 | that its internal state is consistent. It returns None on success,
9 | or throws an ``AssertionError`` if any problems were found.
10 |
11 |
12 | Parameters
13 | ----------
14 | frame: Frame
15 | A :class:`dt.Frame` object that needs to be checked for internal consistency.
16 |
17 | return: None
18 |
19 | except: AssertionError
20 | An exception is raised if there were any issues with the `frame`.
21 |
--------------------------------------------------------------------------------
/docs/api/internal/get_thread_ids.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.internal.get_thread_ids
3 | :src: src/core/datatablemodule.cc get_thread_ids
4 | :cvar: doc_internal_get_thread_ids
5 | :signature: get_thread_ids()
6 |
7 | Return system ids of all threads used internally by datatable.
8 |
9 | Calling this function will cause the threads to spawn if they
10 | haven't done already. (This behavior may change in the future).
11 |
12 |
13 | Parameters
14 | ----------
15 | return: List[str]
16 | The list of thread ids used by the datatable. The first element
17 | in the list is the id of the main thread.
18 |
19 |
20 | See Also
21 | --------
22 | - :attr:`dt.options.nthreads` -- global option that controls the
23 | number of threads in use.
24 |
--------------------------------------------------------------------------------
/docs/api/ltype/__new__.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.ltype.__new__
3 | :src: src/datatable/types.py ___new___
4 |
5 | __new__(self, value)
6 | --
7 |
8 | Find an ltype corresponding to `value`.
9 |
10 | This method is similar to :meth:`dt.stype.__new__()`, except that it
11 | returns an ltype instead of an stype.
12 |
--------------------------------------------------------------------------------
/docs/api/ltype/stypes.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.ltype.stypes
3 | :src: src/datatable/types.py stypes
4 |
--------------------------------------------------------------------------------
/docs/api/math/abs.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.abs
3 | :src: src/core/expr/funary/floating.cc resolve_op_abs
4 | :cvar: doc_math_abs
5 | :signature: abs(x)
6 |
7 | Return the absolute value of ``x``. This function can only be applied
8 | to numeric arguments (i.e. boolean, integer, or real).
9 |
10 | This function upcasts columns of types `bool8`, `int8` and `int16` into
11 | `int32`; for columns of other types the stype is kept.
12 |
13 | Parameters
14 | ----------
15 | x: FExpr
16 | Column expression producing one or more numeric columns.
17 |
18 | return: FExpr
19 | The resulting FExpr evaluates absolute values in all elements
20 | in all columns of `x`.
21 |
22 | Examples
23 | --------
24 |
25 | .. code-block::
26 |
27 | >>> DT = dt.Frame(A=[-3, 2, 4, -17, 0])
28 | >>> DT[:, abs(f.A)]
29 | | A
30 | | int32
31 | -- + -----
32 | 0 | 3
33 | 1 | 2
34 | 2 | 4
35 | 3 | 17
36 | 4 | 0
37 | [5 rows x 1 column]
38 |
39 | See also
40 | --------
41 | - :func:`fabs()`
42 |
--------------------------------------------------------------------------------
/docs/api/math/arccos.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.arccos
3 | :src: src/core/expr/funary/trigonometric.cc resolve_op_arccos
4 | :cvar: doc_math_arccos
5 | :signature: arccos(x)
6 |
7 | Inverse trigonometric cosine of `x`.
8 |
9 | In mathematics, this may be written as :math:`\arccos x` or
10 | :math:`\cos^{-1}x`.
11 |
12 | The returned value is in the interval :math:`[0, \frac12\tau]`,
13 | and NA for the values of ``x`` that lie outside the interval
14 | ``[-1, 1]``. This function is the inverse of
15 | :func:`cos()` in the sense that
16 | `cos(arccos(x)) == x` for all ``x`` in the interval ``[-1, 1]``.
17 |
18 | See also
19 | --------
20 | - :func:`cos(x)` -- the trigonometric cosine function;
21 | - :func:`arcsin(x)` -- the inverse sine function.
22 |
--------------------------------------------------------------------------------
/docs/api/math/arcosh.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.arcosh
3 | :src: src/core/expr/funary/hyperbolic.cc resolve_op_arcosh
4 | :cvar: doc_math_arcosh
5 | :signature: arcosh(x)
6 |
7 | The inverse hyperbolic cosine of `x`.
8 |
9 | This function satisfies the property that ``cosh(arccosh(x)) == x``.
10 | Alternatively, this function can also be computed as
11 | :math:`\cosh^{-1}(x) = \ln(x + \sqrt{x^2 - 1})`.
12 |
13 | See also
14 | --------
15 | - :func:`cosh` -- hyperbolic cosine;
16 | - :func:`arsinh` -- inverse hyperbolic sine.
17 |
--------------------------------------------------------------------------------
/docs/api/math/arcsin.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.arcsin
3 | :src: src/core/expr/funary/trigonometric.cc resolve_op_arcsin
4 | :cvar: doc_math_arcsin
5 | :signature: arcsin(x)
6 |
7 | Inverse trigonometric sine of `x`.
8 |
9 | In mathematics, this may be written as :math:`\arcsin x` or
10 | :math:`\sin^{-1}x`.
11 |
12 | The returned value is in the interval :math:`[-\frac14 \tau, \frac14\tau]`,
13 | and NA for the values of ``x`` that lie outside the interval ``[-1, 1]``.
14 | This function is the inverse of :func:`sin()` in the sense
15 | that `sin(arcsin(x)) == x` for all ``x`` in the interval ``[-1, 1]``.
16 |
17 | See also
18 | --------
19 | - :func:`sin(x)` -- the trigonometric sine function;
20 | - :func:`arccos(x)` -- the inverse cosine function.
21 |
--------------------------------------------------------------------------------
/docs/api/math/arctan.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.arctan
3 | :src: src/core/expr/funary/trigonometric.cc resolve_op_arctan
4 | :cvar: doc_math_arctan
5 | :signature: arctan(x)
6 |
7 | Inverse trigonometric tangent of `x`.
8 |
9 | This function satisfies the property that ``tan(arctan(x)) == x``.
10 |
11 | See also
12 | --------
13 | - :func:`atan2(x, y)` -- two-argument inverse tangent function;
14 | - :func:`tan(x)` -- the trigonometric tangent function.
15 |
--------------------------------------------------------------------------------
/docs/api/math/arsinh.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.arsinh
3 | :src: src/core/expr/funary/hyperbolic.cc resolve_op_arsinh
4 | :cvar: doc_math_arsinh
5 | :signature: arsinh(x)
6 |
7 | The inverse hyperbolic sine of `x`.
8 |
9 | This function satisfies the property that ``sinh(arcsinh(x)) == x``.
10 | Alternatively, this function can also be computed as
11 | :math:`\sinh^{-1}(x) = \ln(x + \sqrt{x^2 + 1})`.
12 |
13 | See also
14 | --------
15 | - :func:`sinh` -- hyperbolic sine;
16 | - :func:`arcosh` -- inverse hyperbolic cosine.
17 |
--------------------------------------------------------------------------------
/docs/api/math/artanh.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.artanh
3 | :src: src/core/expr/funary/hyperbolic.cc resolve_op_artanh
4 | :cvar: doc_math_artanh
5 | :signature: artanh(x)
6 |
7 | The inverse hyperbolic tangent of `x`.
8 |
9 | This function satisfies the property that ``tanh(artanh(x)) == x``.
10 | Alternatively, this function can also be computed as
11 | :math:`\tanh^{-1}(x) = \frac12\ln\frac{1+x}{1-x}`.
12 |
13 | See also
14 | --------
15 | - :func:`tanh` -- hyperbolic tangent;
16 |
--------------------------------------------------------------------------------
/docs/api/math/atan2.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.atan2
3 | :src: src/core/expr/fbinary/math.cc resolve_fn_atan2
4 | :cvar: doc_math_atan2
5 | :signature: atan2(x, y)
6 |
7 | The inverse trigonometric tangent of ``y/x``, taking into account the signs
8 | of ``x`` and ``y`` to produce the correct result.
9 |
10 |
11 | If ``(x,y)`` is a point in a Cartesian plane, then ``arctan2(y, x)`` returns
12 | the radian measure of an angle formed by two rays: one starting at the origin
13 | and passing through point ``(0,1)``, and the other starting at the origin
14 | and passing through point ``(x,y)``. The angle is assumed positive if the
15 | rotation from the first ray to the second occurs counter-clockwise, and
16 | negative otherwise.
17 |
18 | As a special case, ``arctan2(0, 0) == 0``, and ``arctan2(0, -1) == tau/2``.
19 |
20 |
21 | See also
22 | --------
23 | - :func:`arctan(x)` -- inverse tangent function.
24 |
--------------------------------------------------------------------------------
/docs/api/math/cbrt.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.cbrt
3 | :src: src/core/expr/funary/exponential.cc resolve_op_cbrt
4 | :cvar: doc_math_cbrt
5 | :signature: cbrt(x)
6 |
7 | Cubic root of x.
8 |
--------------------------------------------------------------------------------
/docs/api/math/ceil.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.ceil
3 | :src: src/core/expr/funary/floating.cc resolve_op_ceil
4 | :cvar: doc_math_ceil
5 | :signature: ceil(x)
6 |
7 | The smallest integer value not less than `x`, returned as float.
8 |
9 | This function produces a ``float32`` column if the input is of type
10 | ``float32``, or ``float64`` columns for inputs of all other numeric
11 | stypes.
12 |
13 | Parameters
14 | ----------
15 | x: FExpr
16 | One or more numeric columns.
17 |
18 | return: FExpr
19 | Expression that computes the ``ceil()`` function for each row and
20 | column in `x`.
21 |
--------------------------------------------------------------------------------
/docs/api/math/copysign.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.copysign
3 | :src: src/core/expr/fbinary/math.cc resolve_fn_copysign
4 | :cvar: doc_math_copysign
5 | :signature: copysign(x, y)
6 |
7 | Return a float with the magnitude of ``x`` and the sign of ``y``.
8 |
--------------------------------------------------------------------------------
/docs/api/math/cos.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.cos
3 | :src: src/core/expr/funary/trigonometric.cc resolve_op_cos
4 | :cvar: doc_math_cos
5 | :signature: cos(x)
6 |
7 | Compute the trigonometric cosine of angle ``x`` measured in radians.
8 |
9 | This function can only be applied to numeric columns (real, integer, or
10 | boolean), and produces a float64 result, except when the argument ``x`` is
11 | float32, in which case the result is float32 as well.
12 |
13 | See also
14 | --------
15 | - :func:`sin(x)` -- the trigonometric sine function;
16 | - :func:`arccos(x)` -- the inverse cosine function.
17 |
--------------------------------------------------------------------------------
/docs/api/math/cosh.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.cosh
3 | :src: src/core/expr/funary/hyperbolic.cc resolve_op_cosh
4 | :cvar: doc_math_cosh
5 | :signature: cosh(x)
6 |
7 | The hyperbolic cosine of `x`, defined as
8 | :math:`\cosh x = \frac12(e^x + e^{-x})`.
9 |
10 | See also
11 | --------
12 | - :func:`sinh` -- hyperbolic sine;
13 | - :func:`arcosh` -- inverse hyperbolic cosine.
14 |
--------------------------------------------------------------------------------
/docs/api/math/deg2rad.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.deg2rad
3 | :src: src/core/expr/funary/trigonometric.cc resolve_op_deg2rad
4 | :cvar: doc_math_deg2rad
5 | :signature: deg2rad(x)
6 |
7 | Convert angle measured in degrees into radians:
8 | :math:`\operatorname{deg2rad}(x) = x\cdot\frac{\tau}{360}`.
9 |
10 | See also
11 | --------
12 | - :func:`rad2deg(x)` -- convert radians into degrees.
13 |
--------------------------------------------------------------------------------
/docs/api/math/e.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xdata:: datatable.math.e
3 | :src: src/datatable/math.py e
4 |
5 | The base of the natural logarithm :math:`e`, also known as the Euler's
6 | number. This number is defined as the limit
7 | :math:`e = \lim_{n\to\infty}(1 + 1/n)^n`.
8 |
9 | The value is stored at `float64` precision, and is equal to
10 | ``2.718281828459045``.
11 |
12 | See Also
13 | --------
14 | .. py:currentmodule:: None
15 |
16 | - :ext-data:`math.e` -- The Euler's number in the Python ``math``
17 | module;
18 |
--------------------------------------------------------------------------------
/docs/api/math/erf.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.erf
3 | :src: src/core/expr/funary/special.cc resolve_op_erf
4 | :cvar: doc_math_erf
5 | :signature: erf(x)
6 |
7 | Error function ``erf(x)``, which is defined as the integral
8 |
9 | .. math::
10 |
11 | \operatorname{erf}(x) = \frac{2}{\sqrt{\tau}} \int^{x/\sqrt{2}}_0 e^{-\frac12 t^2}dt
12 |
13 | This function is used in computing probabilities arising from the normal
14 | distribution.
15 |
16 | See also
17 | --------
18 | - :func:`erfc(x) ` -- complimentary error function.
19 |
--------------------------------------------------------------------------------
/docs/api/math/erfc.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.erfc
3 | :src: src/core/expr/funary/special.cc resolve_op_erfc
4 | :cvar: doc_math_erfc
5 | :signature: erfc(x)
6 |
7 | Complementary error function ``erfc(x) = 1 - erf(x)``.
8 |
9 | The complementary error function is defined as the integral
10 |
11 | .. math::
12 |
13 | \operatorname{erfc}(x) = \frac{2}{\sqrt{\tau}} \int^{\infty}_{x/\sqrt{2}} e^{-\frac12 t^2}dt
14 |
15 | Although mathematically `erfc(x) = 1-erf(x)`, in practice the RHS
16 | suffers catastrophic loss of precision at large values of `x`. This
17 | function, however, does not have such a drawback.
18 |
19 | See also
20 | --------
21 | - :func:`erf(x) ` -- the error function.
22 |
--------------------------------------------------------------------------------
/docs/api/math/exp.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.exp
3 | :src: src/core/expr/funary/exponential.cc resolve_op_exp
4 | :cvar: doc_math_exp
5 | :signature: exp(x)
6 |
7 | The exponent of `x`, that is :math:`e^x`.
8 |
9 | See also
10 | --------
11 | - :data:`e` -- the Euler's number;
12 | - :func:`expm1(x)` -- exponent function minus one;
13 | - :func:`exp2(x)` -- binary exponent;
14 |
--------------------------------------------------------------------------------
/docs/api/math/exp2.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.exp2
3 | :src: src/core/expr/funary/exponential.cc resolve_op_exp2
4 | :cvar: doc_math_exp2
5 | :signature: exp2(x)
6 |
7 | Binary exponent of x, same as :math:`2^x`.
8 |
9 | See also
10 | --------
11 | - :func:`exp(x)` -- base-:math:`e` exponent.
12 |
--------------------------------------------------------------------------------
/docs/api/math/expm1.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.expm1
3 | :src: src/core/expr/funary/exponential.cc resolve_op_expm1
4 | :cvar: doc_math_expm1
5 | :signature: expm1(x)
6 |
7 | The exponent of `x` minus 1, that is :math:`e^x - 1`. This function is
8 | more accurate for arguments `x` close to zero.
9 |
--------------------------------------------------------------------------------
/docs/api/math/fabs.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.fabs
3 | :src: src/core/expr/funary/floating.cc resolve_op_fabs
4 | :cvar: doc_math_fabs
5 | :signature: fabs(x)
6 |
7 | The absolute value of `x`, returned as float.
8 |
--------------------------------------------------------------------------------
/docs/api/math/floor.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.floor
3 | :src: src/core/expr/funary/floating.cc resolve_op_floor
4 | :cvar: doc_math_floor
5 | :signature: floor(x)
6 |
7 | The largest integer value not greater than `x`, returned as float.
8 |
9 | This function produces a ``float32`` column if the input is of type
10 | ``float32``, or ``float64`` columns for inputs of all other numeric
11 | stypes.
12 |
13 | Parameters
14 | ----------
15 | x: FExpr
16 | One or more numeric columns.
17 |
18 | return: FExpr
19 | Expression that computes the ``floor()`` function for each row and
20 | column in `x`.
21 |
--------------------------------------------------------------------------------
/docs/api/math/fmod.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.fmod
3 | :src: src/core/expr/fbinary/math.cc resolve_fn_fmod
4 | :cvar: doc_math_fmod
5 | :signature: fmod(x, y)
6 |
7 | Floating-point remainder of the division x/y. The result is always
8 | a float, even if the arguments are integers. This function uses
9 | ``std::fmod()`` from the standard C++ library, its convention for
10 | handling of negative numbers may be different than the Python's.
11 |
--------------------------------------------------------------------------------
/docs/api/math/gamma.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.gamma
3 | :src: src/core/expr/funary/special.cc resolve_op_gamma
4 | :cvar: doc_math_gamma
5 | :signature: gamma(x)
6 |
7 | Euler Gamma function of x.
8 |
9 | The gamma function is defined for all ``x`` except for the negative
10 | integers. For positive ``x`` it can be computed via the integral
11 |
12 | .. math::
13 | \Gamma(x) = \int_0^\infty t^{x-1}e^{-t}dt
14 |
15 | For negative ``x`` it can be computed as
16 |
17 | .. math::
18 | \Gamma(x) = \frac{\Gamma(x + k)}{x(x+1)\cdot...\cdot(x+k-1)}
19 |
20 | where :math:`k` is any integer such that :math:`x+k` is positive.
21 |
22 | If `x` is a positive integer, then :math:`\Gamma(x) = (x - 1)!`.
23 |
24 | See also
25 | --------
26 | - :func:`lgamma(x) ` -- log-gamma function.
27 |
--------------------------------------------------------------------------------
/docs/api/math/golden.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xdata:: datatable.math.golden
3 | :src: src/datatable/math.py golden
4 |
5 | The golden ratio :math:`\varphi = (1 + \sqrt{5})/2`, also known as golden
6 | section. This is a number such that if :math:`a = \varphi b`, for some
7 | non-zero :math:`a` and :math:`b`, then it must also be true that
8 | :math:`a + b = \varphi a`.
9 |
10 | The constant is stored with `float64` precision, and its value is
11 | ``1.618033988749895``.
12 |
--------------------------------------------------------------------------------
/docs/api/math/hypot.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.hypot
3 | :src: src/core/expr/fbinary/math.cc resolve_fn_hypot
4 | :cvar: doc_math_hypot
5 | :signature: hypot(x, y)
6 |
7 | The length of the hypotenuse of a right triangle with sides `x` and `y`,
8 | or in math notation :math:`\operatorname{hypot}(x, y) = \sqrt{x^2 + y^2}`.
9 |
--------------------------------------------------------------------------------
/docs/api/math/inf.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xdata:: datatable.math.inf
3 | :src: src/datatable/math.py inf
4 |
5 | Number representing positive infinity :math:`\infty`. Write ``-inf`` for
6 | negative infinity.
7 |
--------------------------------------------------------------------------------
/docs/api/math/isclose.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.isclose
3 | :src: src/core/expr/head_func_isclose.cc pyfn_isclose
4 | :cvar: doc_math_isclose
5 | :signature: isclose(x, y, *, rtol=1e-5, atol=1e-8)
6 |
7 | Compare two numbers x and y, and return True if they are close
8 | within the requested relative/absolute tolerance. This function
9 | only returns True/False, never NA.
10 |
11 | More specifically, isclose(x, y) is True if either of the following
12 | are true:
13 |
14 | - ``x == y`` (including the case when x and y are NAs),
15 | - ``abs(x - y) <= atol + rtol * abs(y)`` and neither x nor y are NA
16 |
17 | The tolerance parameters ``rtol``, ``atol`` must be positive floats,
18 | and cannot be expressions.
19 |
--------------------------------------------------------------------------------
/docs/api/math/isfinite.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.isfinite
3 | :src: src/core/expr/funary/floating.cc resolve_op_isfinite
4 | :cvar: doc_math_isfinite
5 | :signature: isfinite(x)
6 |
7 | Returns True if `x` has a finite value, and False if `x` is infinity
8 | or NaN. This function is equivalent to ``!(isna(x) or isinf(x))``.
9 |
10 | See also
11 | --------
12 | - :func:`isna()`
13 | - :func:`isinf()`
14 |
--------------------------------------------------------------------------------
/docs/api/math/isinf.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.isinf
3 | :src: src/core/expr/funary/floating.cc resolve_op_isinf
4 | :cvar: doc_math_isinf
5 | :signature: isinf(x)
6 |
7 | Returns True if the argument is +/- infinity, and False otherwise.
8 | Note that `isinf(NA) == False`.
9 |
--------------------------------------------------------------------------------
/docs/api/math/isna.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.isna
3 | :src: src/core/expr/funary/floating.cc resolve_op_isna
4 | :tests: tests/math/test-isna.py
5 | :cvar: doc_math_isna
6 | :signature: isna(x)
7 |
8 | Returns `True` if the argument is NA, and `False` otherwise.
9 |
--------------------------------------------------------------------------------
/docs/api/math/ldexp.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.ldexp
3 | :src: src/core/expr/fbinary/math.cc resolve_fn_ldexp
4 | :cvar: doc_math_ldexp
5 | :signature: ldexp(x, y)
6 |
7 | Multiply ``x`` by 2 raised to the power ``y``, i.e. compute ``x * 2**y``.
8 | Column ``x`` is expected to be float, and ``y`` integer.
9 |
--------------------------------------------------------------------------------
/docs/api/math/lgamma.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.lgamma
3 | :src: src/core/expr/funary/special.cc resolve_op_lgamma
4 | :cvar: doc_math_lgamma
5 | :signature: lgamma(x)
6 |
7 | Natural logarithm of the absolute value of the Euler Gamma
8 | function of `x`.
9 |
--------------------------------------------------------------------------------
/docs/api/math/log.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.log
3 | :src: src/core/expr/funary/exponential.cc resolve_op_log
4 | :cvar: doc_math_log
5 | :signature: log(x)
6 |
7 | Natural logarithm of `x`, aka :math:`\ln x`. This function is the
8 | inverse of :func:`exp()`.
9 |
10 | See also
11 | --------
12 | - :func:`log10()` -- decimal logarithm;
13 | - :func:`log2()` -- binary logarithm.
14 |
--------------------------------------------------------------------------------
/docs/api/math/log10.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.log10
3 | :src: src/core/expr/funary/exponential.cc resolve_op_log10
4 | :cvar: doc_math_log10
5 | :signature: log10(x)
6 |
7 | Decimal (base-10) logarithm of x, which is :math:`\lg(x)` or
8 | :math:`\log_{10} x`. This function is the inverse of
9 | :func:`pow(10, x)`.
10 |
11 | See also
12 | --------
13 | - :func:`log()` -- natural logarithm;
14 | - :func:`log2()` -- binary logarithm.
15 |
--------------------------------------------------------------------------------
/docs/api/math/log1p.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.log1p
3 | :src: src/core/expr/funary/exponential.cc resolve_op_log1p
4 | :cvar: doc_math_log1p
5 | :signature: log1p(x)
6 |
7 | Natural logarithm of 1 plus `x`, or :math:`\ln(1 + x)`. This function
8 | has improved numeric precision for small values of `x`.
9 |
--------------------------------------------------------------------------------
/docs/api/math/log2.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.log2
3 | :src: src/core/expr/funary/exponential.cc resolve_op_log2
4 | :cvar: doc_math_log2
5 | :signature: log2(x)
6 |
7 | Binary (base-2) logarithm of x, which in mathematics is :math:`\log_2 x`.
8 |
9 | See also
10 | --------
11 | - :func:`log()` -- natural logarithm;
12 | - :func:`log10()` -- decimal logarithm.
13 |
--------------------------------------------------------------------------------
/docs/api/math/logaddexp.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.logaddexp
3 | :src: src/core/expr/fbinary/math.cc resolve_fn_logaddexp
4 | :cvar: doc_math_logaddexp
5 | :signature: logaddexp(x, y)
6 |
7 | The logarithm of the sum of exponents of x and y. This function is
8 | equivalent to ``log(exp(x) + exp(y))``, but does not suffer from
9 | catastrophic precision loss for small values of x and y.
10 |
--------------------------------------------------------------------------------
/docs/api/math/logaddexp2.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.logaddexp2
3 | :src: src/core/expr/fbinary/math.cc resolve_fn_logaddexp2
4 | :cvar: doc_math_logaddexp2
5 | :signature: logaddexp2(x, y)
6 |
7 | Binary logarithm of the sum of binary exponents of ``x`` and ``y``. This
8 | function is equivalent to ``log2(exp2(x) + exp2(y))``, but does
9 | not suffer from catastrophic precision loss for small values of
10 | ``x`` and ``y``.
11 |
--------------------------------------------------------------------------------
/docs/api/math/nan.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xdata:: datatable.math.nan
3 | :src: src/datatable/math.py nan
4 |
5 | Not-a-number, a special floating-point constant that denotes a missing
6 | number. In most datatable functions you can use ``None`` instead
7 | of ``nan``.
8 |
--------------------------------------------------------------------------------
/docs/api/math/pi.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xdata:: datatable.math.pi
3 | :src: src/datatable/math.py pi
4 |
5 | Mathematical constant :math:`\pi = \frac12\tau`, also known as Archimedes'
6 | constant, equal to the length of a semicircle with radius 1, or
7 | equivalently the arc-length of a :math:`180^\circ` angle `[1]`_.
8 |
9 | The constant is stored at `float64` precision, and its value is
10 | ``3.141592653589793``.
11 |
12 | See Also
13 | --------
14 | .. py:currentmodule:: None
15 |
16 | - :data:`tau` -- mathematical constant
17 | :math:`\tau = 2\pi`;
18 |
19 | - :ext-data:`math.pi` -- The :math:`\pi` constant in the Python ``math``
20 | module;
21 |
22 | .. _`[1]`: https://gallica.bnf.fr/ark:/12148/bpt6k69587/f156.image
23 |
--------------------------------------------------------------------------------
/docs/api/math/pow.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.pow
3 | :src: src/core/expr/fbinary/math.cc resolve_fn_pow
4 | :cvar: doc_math_pow
5 | :signature: pow(x, y)
6 |
7 | Number ``x`` raised to the power ``y``. The return value will be float, even
8 | if the arguments ``x`` and ``y`` are integers.
9 |
10 | This function is equivalent to ``x ** y``.
11 |
--------------------------------------------------------------------------------
/docs/api/math/rad2deg.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.rad2deg
3 | :src: src/core/expr/funary/trigonometric.cc resolve_op_rad2deg
4 | :cvar: doc_math_rad2deg
5 | :signature: rad2deg(x)
6 |
7 | Convert angle measured in radians into degrees:
8 | :math:`\operatorname{rad2deg}(x) = x\cdot\frac{360}{\tau}`.
9 |
10 | See also
11 | --------
12 | - :func:`deg2rad(x)` -- convert degrees into radians.
13 |
--------------------------------------------------------------------------------
/docs/api/math/rint.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.rint
3 | :src: src/core/expr/funary/floating.cc resolve_op_rint
4 | :cvar: doc_math_rint
5 | :signature: rint(x)
6 |
7 | Round the value `x` to the nearest integer.
8 |
--------------------------------------------------------------------------------
/docs/api/math/sign.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.sign
3 | :src: src/core/expr/funary/floating.cc resolve_op_sign
4 | :cvar: doc_math_sign
5 | :signature: sign(x)
6 |
7 | The sign of x, returned as float.
8 |
9 | This function returns `1.0` if `x` is positive (including positive
10 | infinity), `-1.0` if `x` is negative, `0.0` if `x` is zero, and NA if
11 | `x` is NA.
12 |
--------------------------------------------------------------------------------
/docs/api/math/signbit.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.signbit
3 | :src: src/core/expr/funary/floating.cc resolve_op_signbit
4 | :cvar: doc_math_signbit
5 | :signature: signbit(x)
6 |
7 | Returns `True` if `x` is negative (its sign bit is set), and `False` if
8 | `x` is positive. This function is able to distinguish between `-0.0` and
9 | `+0.0`, returning `True`/`False` respectively. If `x` is an NA value, this
10 | function will also return NA.
11 |
--------------------------------------------------------------------------------
/docs/api/math/sin.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.sin
3 | :src: src/core/expr/funary/trigonometric.cc resolve_op_sin
4 | :cvar: doc_math_sin
5 | :signature: sin(x)
6 |
7 | Compute the trigonometric sine of angle ``x`` measured in radians.
8 |
9 | This function can only be applied to numeric columns (real, integer, or
10 | boolean), and produces a float64 result, except when the argument ``x`` is
11 | float32, in which case the result is float32 as well.
12 |
13 | See also
14 | --------
15 | - :func:`cos(x)` -- the trigonometric cosine function;
16 | - :func:`arcsin(x)` -- the inverse sine function.
17 |
--------------------------------------------------------------------------------
/docs/api/math/sinh.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.sinh
3 | :src: src/core/expr/funary/hyperbolic.cc resolve_op_sinh
4 | :cvar: doc_math_sinh
5 | :signature: sinh(x)
6 |
7 | Hyperbolic sine of `x`, defined as
8 | :math:`\sinh x = \frac12(e^x - e^{-x})`.
9 |
10 | See also
11 | --------
12 | - :func:`cosh` -- hyperbolic cosine;
13 | - :func:`arsinh` -- inverse hyperbolic sine.
14 |
--------------------------------------------------------------------------------
/docs/api/math/sqrt.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.sqrt
3 | :src: src/core/expr/funary/exponential.cc resolve_op_sqrt
4 | :cvar: doc_math_sqrt
5 | :signature: sqrt(x)
6 |
7 | The square root of x, same as ``x ** 0.5``.
8 |
--------------------------------------------------------------------------------
/docs/api/math/square.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.square
3 | :src: src/core/expr/funary/exponential.cc resolve_op_square
4 | :cvar: doc_math_square
5 | :signature: square(x)
6 |
7 | The square of x, same as ``x ** 2.0``. As with all other math
8 | functions, the result is floating-point, even if the argument
9 | x is integer.
10 |
--------------------------------------------------------------------------------
/docs/api/math/tan.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.tan
3 | :src: src/core/expr/funary/trigonometric.cc resolve_op_tan
4 | :cvar: doc_math_tan
5 | :signature: tan(x)
6 |
7 | Compute the trigonometric tangent of ``x``, which is the ratio
8 | ``sin(x)/cos(x)``.
9 |
10 | This function can only be applied to numeric columns (real, integer, or
11 | boolean), and produces a float64 result, except when the argument ``x`` is
12 | float32, in which case the result is float32 as well.
13 |
14 | See also
15 | --------
16 | - :func:`arctan(x)` -- the inverse tangent function.
17 |
--------------------------------------------------------------------------------
/docs/api/math/tanh.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.tanh
3 | :src: src/core/expr/funary/hyperbolic.cc resolve_op_tanh
4 | :cvar: doc_math_tanh
5 | :signature: tanh(x)
6 |
7 | Hyperbolic tangent of `x`, defined as
8 | :math:`\tanh x = \frac{\sinh x}{\cosh x} = \frac{e^x-e^{-x}}{e^x+e^{-x}}`.
9 |
10 | See also
11 | --------
12 | - :func:`artanh` -- inverse hyperbolic tangent.
13 |
--------------------------------------------------------------------------------
/docs/api/math/tau.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xdata:: datatable.math.tau
3 | :src: src/datatable/math.py tau
4 |
5 | Mathematical constant :math:`\tau`, also known as a `turn`_, equal to the
6 | circumference of a circle with a unit radius.
7 |
8 | The constant is stored at `float64` precision, and its value is ``6.283185307179586``.
9 |
10 | See Also
11 | --------
12 | .. py:currentmodule:: None
13 |
14 | - :data:`pi` -- mathematical constant :math:`\pi = \frac12\tau`;
15 | - :ext-data:`math.tau` -- The :math:`\tau` constant in the Python ``math`` module;
16 | - `Tau manifesto `_
17 |
18 |
19 | .. _`turn`: https://en.wikipedia.org/wiki/Turn_(angle)
20 |
--------------------------------------------------------------------------------
/docs/api/math/trunc.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.math.trunc
3 | :src: src/core/expr/funary/floating.cc resolve_op_trunc
4 | :cvar: doc_math_trunc
5 | :signature: trunc(x)
6 |
7 | The nearest integer value not greater than `x` in magnitude.
8 |
9 | If x is integer or boolean, then trunc() will return this value
10 | converted to float64. If x is floating-point, then trunc(x) acts as
11 | floor(x) for positive values of x, and as ceil(x) for negative values
12 | of x. This rounding mode is known as rounding towards zero.
13 |
--------------------------------------------------------------------------------
/docs/api/models.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xpy:module:: datatable.models
3 |
4 | datatable.models
5 | ================
6 |
7 | Classes
8 | -------
9 |
10 | .. list-table::
11 | :widths: auto
12 | :class: api-table
13 |
14 | * - :class:`Ftrl`
15 | - FTRL-Proximal online learning model.
16 |
17 | * - :class:`LinearModel`
18 | - Linear model with stohastic gradient descent learning.
19 |
20 |
21 | Functions
22 | ---------
23 |
24 | .. list-table::
25 | :widths: auto
26 | :class: api-table
27 |
28 | * - :func:`aggregate()`
29 | - Aggregate a frame.
30 |
31 | * - :func:`kfold()`
32 | - Perform k-fold split.
33 |
34 | * - :func:`kfold_random()`
35 | - Perform randomized k-fold split.
36 |
37 |
38 | .. toctree::
39 | :hidden:
40 |
41 | Ftrl
42 | LinearModel
43 | aggregate()
44 | kfold()
45 | kfold_random()
46 |
--------------------------------------------------------------------------------
/docs/api/models/Ftrl/alpha.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.models.Ftrl.alpha
3 | :src: src/core/models/py_ftrl.cc Ftrl::get_alpha Ftrl::set_alpha
4 | :cvar: doc_models_Ftrl_alpha
5 | :settable: new_alpha
6 |
7 |
8 | :math:`\alpha` in per-coordinate FTRL-Proximal algorithm.
9 |
10 | Parameters
11 | ----------
12 | return: float
13 | Current `alpha` value.
14 |
15 | new_alpha: float
16 | New `alpha` value, should be positive.
17 |
18 | except: ValueError
19 | The exception is raised when `new_alpha` is not positive.
20 |
--------------------------------------------------------------------------------
/docs/api/models/Ftrl/beta.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.models.Ftrl.beta
3 | :src: src/core/models/py_ftrl.cc Ftrl::get_beta Ftrl::set_beta
4 | :cvar: doc_models_Ftrl_beta
5 | :settable: new_beta
6 |
7 |
8 | :math:`\beta` in per-coordinate FTRL-Proximal algorithm.
9 |
10 | Parameters
11 | ----------
12 | return: float
13 | Current `beta` value.
14 |
15 | new_beta: float
16 | New `beta` value, should be non-negative.
17 |
18 | except: ValueError
19 | The exception is raised when `new_beta` is negative.
20 |
--------------------------------------------------------------------------------
/docs/api/models/Ftrl/colname_hashes.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.models.Ftrl.colname_hashes
3 | :src: src/core/models/py_ftrl.cc Ftrl::get_colname_hashes
4 | :cvar: doc_models_Ftrl_colname_hashes
5 |
6 |
7 | Hashes of the column names used for the hashing trick as
8 | described in the :class:`Ftrl ` class description.
9 |
10 | Parameters
11 | ----------
12 | return: List[int]
13 | A list of the column name hashes.
14 |
15 | See also
16 | --------
17 | - :attr:`.colnames` -- the column names of the
18 | training frame, i.e. the feature names.
19 |
--------------------------------------------------------------------------------
/docs/api/models/Ftrl/colnames.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.models.Ftrl.colnames
3 | :src: src/core/models/py_ftrl.cc Ftrl::get_colnames
4 | :cvar: doc_models_Ftrl_colnames
5 |
6 |
7 | Column names of the training frame, i.e. the feature names.
8 |
9 | Parameters
10 | ----------
11 | return: List[str]
12 | A list of the column names.
13 |
14 | See also
15 | --------
16 | - :attr:`.colname_hashes` -- the hashed column names.
17 |
--------------------------------------------------------------------------------
/docs/api/models/Ftrl/double_precision.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.models.Ftrl.double_precision
3 | :src: src/core/models/py_ftrl.cc Ftrl::get_double_precision
4 | :cvar: doc_models_Ftrl_double_precision
5 |
6 |
7 | An option to indicate whether double precision, i.e. `float64`,
8 | or single precision, i.e. `float32`, arithmetic should be
9 | used for computations. This option is read-only and can only be set
10 | during the `Ftrl` object :meth:`construction `.
11 |
12 | Parameters
13 | ----------
14 | return: bool
15 | Current `double_precision` value.
16 |
--------------------------------------------------------------------------------
/docs/api/models/Ftrl/feature_importances.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.models.Ftrl.feature_importances
3 | :src: src/core/models/py_ftrl.cc Ftrl::get_fi
4 | :cvar: doc_models_Ftrl_feature_importances
5 |
6 |
7 | Feature importances as calculated during the model training and
8 | normalized to `[0; 1]`. The normalization is done by dividing
9 | the accumulated feature importances over the maximum value.
10 |
11 | Parameters
12 | ----------
13 | return: Frame
14 | A frame with two columns: `feature_name` that has stype `str32`,
15 | and `feature_importance` that has stype `float32` or `float64`
16 | depending on whether the :attr:`.double_precision`
17 | option is `False` or `True`.
18 |
--------------------------------------------------------------------------------
/docs/api/models/Ftrl/interactions.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.models.Ftrl.interactions
3 | :src: src/core/models/py_ftrl.cc Ftrl::get_interactions Ftrl::set_interactions
4 | :cvar: doc_models_Ftrl_interactions
5 | :settable: new_interactions
6 |
7 |
8 | The feature interactions to be used for model training. This option is
9 | read-only for a trained model.
10 |
11 | Parameters
12 | ----------
13 | return: Tuple
14 | Current `interactions` value.
15 |
16 | new_interactions: List[List[str] | Tuple[str]] | Tuple[List[str] | Tuple[str]]
17 | New `interactions` value. Each particular interaction
18 | should be a list or a tuple of feature names, where each feature
19 | name is a column name from the training frame.
20 |
21 | except: ValueError
22 | The exception is raised when
23 |
24 | - trying to change this option for a model that has already been trained;
25 | - one of the interactions has zero features.
26 |
--------------------------------------------------------------------------------
/docs/api/models/Ftrl/labels.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.models.Ftrl.labels
3 | :src: src/core/models/py_ftrl.cc Ftrl::get_labels
4 | :cvar: doc_models_Ftrl_labels
5 |
6 |
7 | Classification labels the model was trained on.
8 |
9 | Parameters
10 | ----------
11 | return: Frame
12 | A one-column frame with the classification labels.
13 | In the case of numeric regression, the label is
14 | the target column name.
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/docs/api/models/Ftrl/lambda1.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.models.Ftrl.lambda1
3 | :src: src/core/models/py_ftrl.cc Ftrl::get_lambda1 Ftrl::set_lambda1
4 | :cvar: doc_models_Ftrl_lambda1
5 | :settable: new_lambda1
6 |
7 |
8 | L1 regularization parameter, :math:`\lambda_1` in per-coordinate
9 | FTRL-Proximal algorithm.
10 |
11 | Parameters
12 | ----------
13 | return: float
14 | Current `lambda1` value.
15 |
16 | new_lambda1: float
17 | New `lambda1` value, should be non-negative.
18 |
19 | except: ValueError
20 | The exception is raised when `new_lambda1` is negative.
21 |
--------------------------------------------------------------------------------
/docs/api/models/Ftrl/lambda2.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.models.Ftrl.lambda2
3 | :src: src/core/models/py_ftrl.cc Ftrl::get_lambda2 Ftrl::set_lambda2
4 | :cvar: doc_models_Ftrl_lambda2
5 | :settable: new_lambda2
6 |
7 |
8 | L2 regularization parameter, :math:`\lambda_2` in per-coordinate
9 | FTRL-Proximal algorithm.
10 |
11 | Parameters
12 | ----------
13 | return: float
14 | Current `lambda2` value.
15 |
16 | new_lambda2: float
17 | New `lambda2` value, should be non-negative.
18 |
19 | except: ValueError
20 | The exception is raised when `new_lambda2` is negative.
21 |
--------------------------------------------------------------------------------
/docs/api/models/Ftrl/mantissa_nbits.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.models.Ftrl.mantissa_nbits
3 | :src: src/core/models/py_ftrl.cc Ftrl::get_mantissa_nbits Ftrl::set_mantissa_nbits
4 | :cvar: doc_models_Ftrl_mantissa_nbits
5 | :settable: new_mantissa_nbits
6 |
7 |
8 | Number of mantissa bits to take into account for hashing floats.
9 | This option is read-only for a trained model.
10 |
11 | Parameters
12 | ----------
13 | return: int
14 | Current `mantissa_nbits` value.
15 |
16 | new_mantissa_nbits: int
17 | New `mantissa_nbits` value, should be non-negative and
18 | less than or equal to `52`, that is a number of
19 | mantissa bits in a C++ 64-bit `double`.
20 |
21 | except: ValueError
22 | The exception is raised when
23 |
24 | - trying to change this option for a model that has already been trained;
25 | - `new_mantissa_nbits` value is negative or larger than `52`.
26 |
--------------------------------------------------------------------------------
/docs/api/models/Ftrl/model.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.models.Ftrl.model
3 | :src: src/core/models/py_ftrl.cc Ftrl::get_model
4 | :cvar: doc_models_Ftrl_model
5 |
6 |
7 | Trained models weights, i.e. `z` and `n` coefficients
8 | in per-coordinate FTRL-Proximal algorithm.
9 |
10 | Parameters
11 | ----------
12 | return: Frame
13 | A frame of shape `(nbins, 2 * nlabels)`, where `nlabels` is
14 | the total number of labels the model was trained on, and
15 | :attr:`nbins ` is the number of bins
16 | used for the hashing trick. Odd and even columns represent
17 | the `z` and `n` model coefficients, respectively.
18 |
--------------------------------------------------------------------------------
/docs/api/models/Ftrl/model_type_trained.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.models.Ftrl.model_type_trained
3 | :src: src/core/models/py_ftrl.cc Ftrl::get_model_type_trained
4 | :cvar: doc_models_Ftrl_model_type_trained
5 |
6 |
7 | The model type `Ftrl` has built.
8 |
9 | Parameters
10 | ----------
11 | return: str
12 | Could be one of the following: `"regression"`, `"binomial"`,
13 | `"multinomial"` or `"none"` for untrained model.
14 |
15 | See also
16 | --------
17 | - :attr:`.model_type` -- the model type `Ftrl` should build.
18 |
19 |
--------------------------------------------------------------------------------
/docs/api/models/Ftrl/nbins.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.models.Ftrl.nbins
3 | :src: src/core/models/py_ftrl.cc Ftrl::get_nbins Ftrl::set_nbins
4 | :cvar: doc_models_Ftrl_nbins
5 | :settable: newnbins
6 |
7 |
8 | Number of bins to be used for the hashing trick.
9 | This option is read-only for a trained model.
10 |
11 | Parameters
12 | ----------
13 | return: int
14 | Current `nbins` value.
15 |
16 | new_nbins: int
17 | New `nbins` value, should be positive.
18 |
19 | except: ValueError
20 | The exception is raised when
21 |
22 | - trying to change this option for a model that has already been trained;
23 | - `new_nbins` value is not positive.
24 |
--------------------------------------------------------------------------------
/docs/api/models/Ftrl/negative_class.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.models.Ftrl.negative_class
3 | :src: src/core/models/py_ftrl.cc Ftrl::get_negative_class Ftrl::set_negative_class
4 | :cvar: doc_models_Ftrl_negative_class
5 | :settable: new_negative_class
6 |
7 |
8 | An option to indicate if a "negative" class should be created
9 | in the case of multinomial classification. For the "negative"
10 | class the model will train on all the negatives, and if
11 | a new label is encountered in the target column, its
12 | weights are initialized to the current "negative" class weights.
13 | If `negative_class` is set to `False`, the initial weights
14 | become zeros.
15 |
16 | This option is read-only for a trained model.
17 |
18 | Parameters
19 | ----------
20 | return: bool
21 | Current `negative_class` value.
22 |
23 | new_negative_class: bool
24 | New `negative_class` value.
25 |
26 | except: ValueError
27 | The exception is raised when trying to change this option
28 | for a model that has already been trained.
29 |
--------------------------------------------------------------------------------
/docs/api/models/Ftrl/nepochs.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.models.Ftrl.nepochs
3 | :src: src/core/models/py_ftrl.cc Ftrl::get_nepochs Ftrl::set_nepochs
4 | :cvar: doc_models_Ftrl_nepochs
5 | :settable: new_nepochs
6 |
7 |
8 | Number of training epochs. When `nepochs` is an integer number,
9 | the model will train on all the data provided to :meth:`.fit` method
10 | `nepochs` times. If `nepochs` has a fractional part `{nepochs}`,
11 | the model will train on all the data `[nepochs]` times,
12 | i.e. the integer part of `nepochs`. Plus, it will also perform an additional
13 | training iteration on the `{nepochs}` fraction of data.
14 |
15 | Parameters
16 | ----------
17 | return: float
18 | Current `nepochs` value.
19 |
20 | new_nepochs: float
21 | New `nepochs` value, should be non-negative.
22 |
23 | except: ValueError
24 | The exception is raised when `new_nepochs` value is negative.
25 |
--------------------------------------------------------------------------------
/docs/api/models/Ftrl/params.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.models.Ftrl.params
3 | :src: src/core/models/py_ftrl.cc Ftrl::get_params_namedtuple Ftrl::set_params_namedtuple
4 | :cvar: doc_models_Ftrl_params
5 | :settable: new_params
6 |
7 |
8 | `Ftrl` model parameters as a named tuple `FtrlParams`,
9 | see :meth:`.__init__` for more details.
10 | This option is read-only for a trained model.
11 |
12 | Parameters
13 | ----------
14 | return: FtrlParams
15 | Current `params` value.
16 |
17 | new_params: FtrlParams
18 | New `params` value.
19 |
20 | except: ValueError
21 | The exception is raised when
22 |
23 | - trying to change this option for a model that has already been trained;
24 | - individual parameter values are incompatible with the corresponding setters.
25 |
--------------------------------------------------------------------------------
/docs/api/models/Ftrl/predict.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.models.Ftrl.predict
3 | :src: src/core/models/py_ftrl.cc Ftrl::predict
4 | :cvar: doc_models_Ftrl_predict
5 | :tests: tests/models/test-ftrl.py
6 | :signature: predict(self, X)
7 |
8 |
9 | Predict for the input samples.
10 |
11 | Parameters
12 | ----------
13 | X: Frame
14 | A frame to make predictions for. It should have the same number
15 | of columns as the training frame.
16 |
17 | return: Frame
18 | A new frame of shape `(X.nrows, nlabels)` with the predicted probabilities
19 | for each row of frame `X` and each of `nlabels` labels
20 | the model was trained for.
21 |
22 | See also
23 | --------
24 | - :meth:`.fit` -- train model on the input samples and targets.
25 | - :meth:`.reset` -- reset the model.
26 |
--------------------------------------------------------------------------------
/docs/api/models/Ftrl/reset.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.models.Ftrl.reset
3 | :src: src/core/models/py_ftrl.cc Ftrl::reset
4 | :cvar: doc_models_Ftrl_reset
5 | :signature: reset(self)
6 |
7 |
8 | Reset `Ftrl` model by resetting all the model weights, labels and
9 | feature importance information.
10 |
11 | Parameters
12 | ----------
13 | return: None
14 |
15 | See also
16 | --------
17 | - :meth:`.fit` -- train model on a dataset.
18 | - :meth:`.predict` -- predict on a dataset.
19 |
20 |
21 |
--------------------------------------------------------------------------------
/docs/api/models/LinearModel/double_precision.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.models.LinearModel.double_precision
3 | :src: src/core/models/py_linearmodel.cc LinearModel::get_double_precision
4 | :cvar: doc_models_LinearModel_double_precision
5 |
6 |
7 | An option to indicate whether double precision, i.e. `float64`,
8 | or single precision, i.e. `float32`, arithmetic should be
9 | used for computations. This option is read-only and can only be set
10 | during the `LinearModel` object :meth:`construction `.
11 |
12 | Parameters
13 | ----------
14 | return: bool
15 | Current `double_precision` value.
16 |
--------------------------------------------------------------------------------
/docs/api/models/LinearModel/eta0.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.models.LinearModel.eta0
3 | :src: src/core/models/py_linearmodel.cc LinearModel::get_eta0 LinearModel::set_eta0
4 | :cvar: doc_models_LinearModel_eta0
5 | :settable: new_eta0
6 |
7 |
8 | Learning rate.
9 |
10 | Parameters
11 | ----------
12 | return: float
13 | Current `eta0` value.
14 |
15 | new_eta0: float
16 | New `eta0` value, should be positive.
17 |
18 | except: ValueError
19 | The exception is raised when `new_eta0` is not positive.
20 |
--------------------------------------------------------------------------------
/docs/api/models/LinearModel/eta_decay.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.models.LinearModel.eta_decay
3 | :src: src/core/models/py_linearmodel.cc LinearModel::get_eta_decay LinearModel::set_eta_decay
4 | :cvar: doc_models_LinearModel_eta_decay
5 | :settable: new_eta_decay
6 |
7 |
8 | Decay for the `"time-based"` and `"step-based"` learning rate schedules.
9 |
10 | Parameters
11 | ----------
12 | return: float
13 | Current `eta_decay` value.
14 |
15 | new_eta_decay: float
16 | New `eta_decay` value, should be non-negative.
17 |
18 | except: ValueError
19 | The exception is raised when `new_eta_decay` is negative.
20 |
--------------------------------------------------------------------------------
/docs/api/models/LinearModel/eta_drop_rate.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.models.LinearModel.eta_drop_rate
3 | :src: src/core/models/py_linearmodel.cc LinearModel::get_eta_drop_rate LinearModel::set_eta_drop_rate
4 | :cvar: doc_models_LinearModel_eta_drop_rate
5 | :settable: new_eta_drop_rate
6 |
7 |
8 | Drop rate for the `"step-based"` learning rate schedule.
9 |
10 | Parameters
11 | ----------
12 | return: float
13 | Current `eta_drop_rate` value.
14 |
15 | new_eta_drop_rate: float
16 | New `eta_drop_rate` value, should be positive.
17 |
18 | except: ValueError
19 | The exception is raised when `new_eta_drop_rate` is not positive.
20 |
--------------------------------------------------------------------------------
/docs/api/models/LinearModel/eta_schedule.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.models.LinearModel.eta_schedule
3 | :src: src/core/models/py_linearmodel.cc LinearModel::get_eta_schedule LinearModel::set_eta_schedule
4 | :cvar: doc_models_LinearModel_eta_schedule
5 | :settable: new_eta_schedule
6 |
7 |
8 | Learning rate `schedule `_
9 |
10 | - `"constant"` for constant `eta`;
11 | - `"time-based"` for time-based schedule;
12 | - `"step-based"` for step-based schedule;
13 | - `"exponential"` for exponential schedule.
14 |
15 | Parameters
16 | ----------
17 | return: str
18 | Current `eta_schedule` value.
19 |
20 | new_eta_schedule: "constant" | "time-based" | "step-based" | "exponential"
21 | New `eta_schedule` value.
22 |
--------------------------------------------------------------------------------
/docs/api/models/LinearModel/is_fitted.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.models.LinearModel.is_fitted
3 | :src: src/core/models/py_linearmodel.cc LinearModel::is_fitted
4 | :tests: tests/models/test-linearmodel.py
5 | :signature: is_fitted(self)
6 | :cvar: doc_models_LinearModel_is_fitted
7 |
8 |
9 | Report model status.
10 |
11 | Parameters
12 | ----------
13 | return: bool
14 | `True` if model is trained, `False` otherwise.
15 |
--------------------------------------------------------------------------------
/docs/api/models/LinearModel/labels.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.models.LinearModel.labels
3 | :src: src/core/models/py_linearmodel.cc LinearModel::get_labels
4 | :cvar: doc_models_LinearModel_labels
5 |
6 |
7 | Classification labels the model was trained on.
8 |
9 | Parameters
10 | ----------
11 | return: Frame
12 | A one-column frame with the classification labels.
13 | In the case of numeric regression, the label is
14 | the target column name.
15 |
--------------------------------------------------------------------------------
/docs/api/models/LinearModel/lambda1.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.models.LinearModel.lambda1
3 | :src: src/core/models/py_linearmodel.cc LinearModel::get_lambda1 LinearModel::set_lambda1
4 | :cvar: doc_models_LinearModel_lambda1
5 | :settable: new_lambda1
6 |
7 |
8 | L1 regularization parameter.
9 |
10 | Parameters
11 | ----------
12 | return: float
13 | Current `lambda1` value.
14 |
15 | new_lambda1: float
16 | New `lambda1` value, should be non-negative.
17 |
18 | except: ValueError
19 | The exception is raised when `new_lambda1` is negative.
20 |
--------------------------------------------------------------------------------
/docs/api/models/LinearModel/lambda2.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.models.LinearModel.lambda2
3 | :src: src/core/models/py_linearmodel.cc LinearModel::get_lambda2 LinearModel::set_lambda2
4 | :cvar: doc_models_LinearModel_lambda2
5 | :settable: new_lambda2
6 |
7 |
8 | L2 regularization parameter.
9 |
10 | Parameters
11 | ----------
12 | return: float
13 | Current `lambda2` value.
14 |
15 | new_lambda2: float
16 | New `lambda2` value, should be non-negative.
17 |
18 | except: ValueError
19 | The exception is raised when `new_lambda2` is negative.
20 |
--------------------------------------------------------------------------------
/docs/api/models/LinearModel/model.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.models.LinearModel.model
3 | :src: src/core/models/py_linearmodel.cc LinearModel::get_model
4 | :cvar: doc_models_LinearModel_model
5 |
6 |
7 | Trained models coefficients.
8 |
9 | Parameters
10 | ----------
11 | return: Frame
12 | A frame of shape `(nfeatures + 1, nlabels)`, where `nlabels` is
13 | the number of labels the model was trained on, and
14 | `nfeatures` is the number of features. Each column contains
15 | model coefficients for the corresponding label: starting from
16 | the intercept and following by the coefficients for each of
17 | of the `nfeatures` features.
18 |
--------------------------------------------------------------------------------
/docs/api/models/LinearModel/model_type.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.models.LinearModel.model_type
3 | :src: src/core/models/py_linearmodel.cc LinearModel::get_model_type LinearModel::set_model_type
4 | :cvar: doc_models_LinearModel_model_type
5 | :settable: new_model_type
6 |
7 |
8 | A type of the model `LinearModel` should build:
9 |
10 | - `"binomial"` for binomial classification;
11 | - `"multinomial"` for multinomial classification;
12 | - `"regression"` for numeric regression;
13 | - `"auto"` for automatic model type detection based on the target column `stype`.
14 |
15 | This option is read-only for a trained model.
16 |
17 | Parameters
18 | ----------
19 | return: str
20 | Current `model_type` value.
21 |
22 | new_model_type: "binomial" | "multinomial" | "regression" | "auto"
23 | New `model_type` value.
24 |
25 | except: ValueError
26 | The exception is raised when trying to change this option
27 | for a model that has already been trained.
28 |
--------------------------------------------------------------------------------
/docs/api/models/LinearModel/negative_class.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.models.LinearModel.negative_class
3 | :src: src/core/models/py_linearmodel.cc LinearModel::get_negative_class LinearModel::set_negative_class
4 | :cvar: doc_models_LinearModel_negative_class
5 | :settable: new_negative_class
6 |
7 |
8 | An option to indicate if a "negative" class should be created
9 | in the case of multinomial classification. For the "negative"
10 | class the model will train on all the negatives, and if
11 | a new label is encountered in the target column, its
12 | coefficients are initialized to the current "negative" class coefficients.
13 | If `negative_class` is set to `False`, the initial coefficients
14 | become zeros.
15 |
16 | This option is read-only for a trained model.
17 |
18 | Parameters
19 | ----------
20 | return: bool
21 | Current `negative_class` value.
22 |
23 | new_negative_class: bool
24 | New `negative_class` value.
25 |
26 | except: ValueError
27 | The exception is raised when trying to change this option
28 | for a model that has already been trained.
29 |
--------------------------------------------------------------------------------
/docs/api/models/LinearModel/nepochs.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.models.LinearModel.nepochs
3 | :src: src/core/models/py_linearmodel.cc LinearModel::get_nepochs LinearModel::set_nepochs
4 | :cvar: doc_models_LinearModel_nepochs
5 | :settable: new_nepochs
6 |
7 |
8 | Number of training epochs. When `nepochs` is an integer number,
9 | the model will train on all the data provided to :meth:`.fit` method
10 | `nepochs` times. If `nepochs` has a fractional part `{nepochs}`,
11 | the model will train on all the data `[nepochs]` times,
12 | i.e. the integer part of `nepochs`. Plus, it will also perform an additional
13 | training iteration on the `{nepochs}` fraction of data.
14 |
15 | Parameters
16 | ----------
17 | return: float
18 | Current `nepochs` value.
19 |
20 | new_nepochs: float
21 | New `nepochs` value, should be non-negative.
22 |
23 | except: ValueError
24 | The exception is raised when `new_nepochs` value is negative.
25 |
--------------------------------------------------------------------------------
/docs/api/models/LinearModel/params.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.models.LinearModel.params
3 | :src: src/core/models/py_linearmodel.cc LinearModel::get_params_namedtuple LinearModel::set_params_namedtuple
4 | :cvar: doc_models_LinearModel_params
5 | :settable: new_params
6 |
7 | `LinearModel` model parameters as a named tuple `LinearModelParams`,
8 | see :meth:`.__init__` for more details.
9 | This option is read-only for a trained model.
10 |
11 | Parameters
12 | ----------
13 | return: LinearModelParams
14 | Current `params` value.
15 |
16 | new_params: LinearModelParams
17 | New `params` value.
18 |
19 | except: ValueError
20 | The exception is raised when
21 |
22 | - trying to change this option for a model that has already been trained;
23 | - individual parameter values are incompatible with the corresponding setters.
24 |
25 |
--------------------------------------------------------------------------------
/docs/api/models/LinearModel/predict.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.models.LinearModel.predict
3 | :src: src/core/models/py_linearmodel.cc LinearModel::predict
4 | :tests: tests/models/test-linearmodel.py
5 | :cvar: doc_models_LinearModel_predict
6 | :signature: predict(self, X)
7 |
8 |
9 | Predict for the input samples.
10 |
11 | Parameters
12 | ----------
13 | X: Frame
14 | A frame to make predictions for. It should have the same number
15 | of columns as the training frame.
16 |
17 | return: Frame
18 | A new frame of shape `(X.nrows, nlabels)` with the predicted probabilities
19 | for each row of frame `X` and each of `nlabels` labels
20 | the model was trained for.
21 |
22 | See also
23 | --------
24 | - :meth:`.fit` -- train model on the input samples and targets.
25 | - :meth:`.reset` -- reset the model.
26 |
27 |
28 |
--------------------------------------------------------------------------------
/docs/api/models/LinearModel/reset.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.models.LinearModel.reset
3 | :src: src/core/models/py_linearmodel.cc LinearModel::reset
4 | :tests: tests/models/test-linearmodel.py
5 | :cvar: doc_models_LinearModel_reset
6 | :signature: reset(self)
7 |
8 |
9 | Reset linear model by resetting all the model coefficients and labels.
10 |
11 | Parameters
12 | ----------
13 | return: None
14 |
15 | See also
16 | --------
17 | - :meth:`.fit` -- train model on a dataset.
18 | - :meth:`.predict` -- predict on a dataset.
19 |
20 |
--------------------------------------------------------------------------------
/docs/api/models/LinearModel/seed.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.models.LinearModel.seed
3 | :src: src/core/models/py_linearmodel.cc LinearModel::get_seed LinearModel::set_seed
4 | :cvar: doc_models_LinearModel_seed
5 | :settable: new_seed
6 |
7 |
8 | Seed for the quasi-random number generator that is used for
9 | data shuffling when fitting the model. If seed is `0`,
10 | no shuffling is performed.
11 |
12 | Parameters
13 | ----------
14 | return: int
15 | Current `seed` value.
16 |
17 | new_seed: int
18 | New `seed` value, should be non-negative.
19 |
--------------------------------------------------------------------------------
/docs/api/namespace.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xclass:: datatable.Namespace
3 | :src: src/core/expr/namespace.h Namespace
4 | :cvar: doc_Namespace
5 |
6 | A namespace is an environment that provides lazy access to columns of
7 | a frame when performing computations within
8 | :meth:`DT[i,j,...] `.
9 |
10 | This class should not be instantiated directly, instead use the
11 | singleton instances :data:`f ` and :data:`g `
12 | exported from the :mod:`datatable` module.
13 |
14 |
15 | Special methods
16 | ---------------
17 |
18 | .. list-table::
19 | :widths: auto
20 | :class: api-table
21 |
22 | * - :meth:`.__getattribute__(attr)`
23 | - Access columns as attributes.
24 |
25 | * - :meth:`.__getitem__(item)`
26 | - Access columns by their names / indices.
27 |
28 |
29 | .. toctree::
30 | :hidden:
31 |
32 | .__getitem__()
33 | .__getattribute__()
34 |
--------------------------------------------------------------------------------
/docs/api/namespace/__getattribute__.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Namespace.__getattribute__
3 | :src: src/core/expr/namespace.cc Namespace::m__getattr__
4 |
5 | __getattribute__(self, name)
6 | --
7 |
8 | Retrieve a column from the namespace by `name`.
9 |
10 | This is a convenience form that can be used to access simply-named
11 | columns. For example: ``f.Age`` denotes a column called ``"Age"``,
12 | and is exactly equivalent to ``f['Age']``.
13 |
14 |
15 | Parameters
16 | ----------
17 | name: str
18 | Name of the column to select.
19 |
20 | return: FExpr
21 | An expression that selects the specified column from a frame.
22 |
23 |
24 | See also
25 | --------
26 | - :meth:`.__getitem__()` -- retrieving columns
27 | via the ``[]``-notation.
28 |
--------------------------------------------------------------------------------
/docs/api/options/debug.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xclass:: datatable.options.debug
3 | :qual-type: class
4 | :src: --
5 |
6 | This namespace contains the following debug options:
7 |
8 | .. list-table::
9 | :widths: auto
10 | :class: api-table
11 |
12 | * - :attr:`.arg_max_size `
13 | - The number of characters to use per a function/method argument.
14 |
15 | * - :attr:`.enabled `
16 | - Option that enables logging of the debug information.
17 |
18 | * - :attr:`.logger `
19 | - The custom logger object.
20 |
21 | * - :attr:`.report_args `
22 | - Option that enables logging of the function/method arguments.
23 |
24 | .. toctree::
25 | :hidden:
26 |
27 | arg_max_size
28 | enabled
29 | logger
30 | report_args
31 |
--------------------------------------------------------------------------------
/docs/api/options/debug/arg_max_size.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.options.debug.arg_max_size
3 | :src: src/core/call_logger.cc get_arg_max_size set_arg_max_size
4 | :cvar: doc_options_debug_arg_max_size
5 | :settable: value
6 |
7 | This option limits the display size of each argument in order
8 | to prevent potentially huge outputs. It has no effect,
9 | if :attr:`debug.report_args ` is
10 | `False`.
11 |
12 | Parameters
13 | ----------
14 | return: int
15 | Current `arg_max_size` value. Initially, this option is set to `100`.
16 |
17 | value: int
18 | New `arg_max_size` value, should be non-negative.
19 | If `value < 10`, then `arg_max_size` will be set to `10`.
20 |
21 | except: TypeError
22 | The exception is raised when `value` is negative.
23 |
--------------------------------------------------------------------------------
/docs/api/options/debug/enabled.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.options.debug.enabled
3 | :src: src/core/call_logger.cc get_enabled set_enabled
4 | :cvar: doc_options_debug_enabled
5 | :settable: value
6 |
7 | This option controls whether or not all the calls to the datatable core
8 | functions should be logged.
9 |
10 |
11 | Parameters
12 | ----------
13 | return: bool
14 | Current `enabled` value. Initially, this option is set to `False`.
15 |
16 | value: bool
17 | New `enabled` value. If set to `True`, all the calls to the datatable
18 | core functions will be logged along with their respective timings.
19 |
--------------------------------------------------------------------------------
/docs/api/options/debug/logger.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.options.debug.logger
3 | :src: src/core/call_logger.cc get_logger set_logger
4 | :cvar: doc_options_debug_logger
5 | :settable: value
6 |
7 | The logger object used for reporting calls to datatable core
8 | functions. This option has no effect if
9 | :attr:`debug.enabled ` is `False`.
10 |
11 | Parameters
12 | ----------
13 | return: object
14 | Current `logger` value. Initially, this option is set to `None`,
15 | meaning that the built-in logger should be used.
16 |
17 | value: object
18 | New `logger` value.
19 |
20 | except: TypeError
21 | The exception is raised when `value` is not an object
22 | having a method `.debug(self, msg)`.
23 |
--------------------------------------------------------------------------------
/docs/api/options/debug/report_args.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.options.debug.report_args
3 | :src: src/core/call_logger.cc get_report_args set_report_args
4 | :cvar: doc_options_debug_report_args
5 | :settable: value
6 |
7 | This option controls whether log messages for the function
8 | and method calls should contain information about the arguments
9 | of those calls.
10 |
11 | Parameters
12 | ----------
13 | return: bool
14 | Current `report_args` value. Initially, this option is set to `False`.
15 |
16 | value: object
17 | New `report_args` value.
18 |
--------------------------------------------------------------------------------
/docs/api/options/display/allow_unicode.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.options.display.allow_unicode
3 | :src: src/core/frame/repr/repr_options.cc get_allow_unicode set_allow_unicode
4 | :cvar: doc_options_display_allow_unicode
5 | :settable: value
6 |
7 | This option controls whether or not unicode characters are
8 | allowed in the datatable output.
9 |
10 | Parameters
11 | ----------
12 | return: bool
13 | Current `allow_unicode` value. Initially, this option is set to `True`.
14 |
15 | value: bool
16 | New `allow_unicode` value. If `True`, datatable will allow unicode
17 | characters (encoded as UTF-8) to be printed into the output.
18 | If `False`, then unicode characters will either be avoided, or
19 | hex-escaped as necessary.
20 |
--------------------------------------------------------------------------------
/docs/api/options/display/head_nrows.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.options.display.head_nrows
3 | :src: src/core/frame/repr/repr_options.cc get_head_nrows set_head_nrows
4 | :cvar: doc_options_display_head_nrows
5 | :settable: value
6 |
7 | This option controls the number of rows from the top of a frame
8 | to be displayed when the frame's output is truncated due to the total number of
9 | rows exceeding :attr:`display.max_nrows `
10 | value.
11 |
12 | Parameters
13 | ----------
14 | return: int
15 | Current `head_nrows` value. Initially, this option is set to `15`.
16 |
17 | value: int
18 | New `head_nrows` value, should be non-negative.
19 |
20 | except: ValueError
21 | The exception is raised when the `value` is negative.
22 |
--------------------------------------------------------------------------------
/docs/api/options/display/interactive.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.options.display.interactive
3 | :src: src/core/frame/repr/repr_options.cc get_interactive set_interactive
4 | :cvar: doc_options_display_interactive
5 | :settable: value
6 |
7 | .. warning::
8 |
9 | This option is currently not working properly
10 | `[#2669] `_
11 |
12 | This option controls the behavior of a Frame when it is viewed in a
13 | text console. To enter the interactive mode manually, one can still
14 | call the :meth:`Frame.view() ` method.
15 |
16 | Parameters
17 | ----------
18 | return: bool
19 | Current `interactive` value. Initially, this option is set to `False`.
20 |
21 | value: bool
22 | New `interactive` value. If `True`, frames will be shown in
23 | the interactove mode, allowing you to navigate the rows/columns
24 | with the keyboard. If `False`, frames will be shown in regular,
25 | non-interactive mode.
26 |
--------------------------------------------------------------------------------
/docs/api/options/display/tail_nrows.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.options.display.tail_nrows
3 | :src: src/core/frame/repr/repr_options.cc get_tail_nrows set_tail_nrows
4 | :cvar: doc_options_display_tail_nrows
5 | :settable: value
6 |
7 | This option controls the number of rows from the bottom of a frame
8 | to be displayed when the frame's output is truncated due to the total number of
9 | rows exceeding :attr:`max_nrows `
10 | value.
11 |
12 | Parameters
13 | ----------
14 | return: int
15 | Current `tail_nrows` value. Initially, this option is set to `5`.
16 |
17 | value: int
18 | New `tail_nrows` value, should be non-negative.
19 |
20 | except: ValueError
21 | The exception is raised when the `value` is negative.
22 |
--------------------------------------------------------------------------------
/docs/api/options/display/use_colors.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.options.display.use_colors
3 | :src: src/core/frame/repr/repr_options.cc get_use_colors set_use_colors
4 | :cvar: doc_options_display_use_colors
5 | :settable: value
6 |
7 | This option controls whether or not to use colors when printing
8 | datatable messages into the console. Turn this off if your terminal is unable to
9 | display ANSI escape sequences, or if the colors make output not legible.
10 |
11 | Parameters
12 | ----------
13 | return: bool
14 | Current `use_colors` value. Initially, this option is set to `True`.
15 |
16 | value: bool
17 | New `use_colors` value.
18 |
19 |
--------------------------------------------------------------------------------
/docs/api/options/frame.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xclass:: datatable.options.frame
3 | :qual-type: class
4 | :src: --
5 |
6 | This namespace contains the following :class:`Frame ` options:
7 |
8 | .. list-table::
9 | :widths: auto
10 | :class: api-table
11 |
12 | * - :attr:`.names_auto_index `
13 | - Initial value of the default column name index.
14 |
15 | * - :attr:`.names_auto_prefix `
16 | - Default column name prefix.
17 |
18 |
19 | .. toctree::
20 | :hidden:
21 |
22 | names_auto_index
23 | names_auto_prefix
24 |
25 |
--------------------------------------------------------------------------------
/docs/api/options/frame/names_auto_index.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.options.frame.names_auto_index
3 | :src: src/core/frame/names.cc get_names_auto_index set_names_auto_index
4 | :settable: new_names_auto_index
5 | :cvar: doc_options_frame_names_auto_index
6 |
7 | This option controls the starting index that is used for auto-naming
8 | the columns. By default, the names that datatable assigns to frame's columns are
9 | `C0`, `C1`, `C2`, etc. Setting `names_auto_index`, for instance, to
10 | `1` will cause the columns to be named as `C1`, `C2`, `C3`, etc.
11 |
12 | Parameters
13 | ----------
14 | return: int
15 | Current `names_auto_index` value. Initially, this option is set to `0`.
16 |
17 | new_names_auto_index: int
18 | New `names_auto_index` value.
19 |
20 | See Also
21 | --------
22 | - :ref:`name-mangling` -- tutorial on name mangling.
23 |
--------------------------------------------------------------------------------
/docs/api/options/frame/names_auto_prefix.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.options.frame.names_auto_prefix
3 | :src: src/core/frame/names.cc get_names_auto_prefix set_names_auto_prefix
4 | :settable: new_names_auto_prefix
5 | :cvar: doc_options_frame_names_auto_prefix
6 |
7 | This option controls the prefix that is used for auto-naming
8 | the columns. By default, the names that datatable assigns to frame's columns are
9 | `C0`, `C1`, `C2`, etc. Setting `names_auto_prefix`, for instance, to
10 | `Z` will cause the columns to be named as `Z1`, `Z2`, `Z3`, etc.
11 |
12 | Parameters
13 | ----------
14 | return: str
15 | Current `names_auto_prefix` value. Initially, this option is set to `C`.
16 |
17 | new_names_auto_prefix: str
18 | New `names_auto_prefix` value.
19 |
20 | See Also
21 | --------
22 | - :ref:`name-mangling` -- tutorial on name mangling.
23 |
24 |
--------------------------------------------------------------------------------
/docs/api/options/fread.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xclass:: datatable.options.fread
3 | :qual-type: class
4 | :src: --
5 |
6 | This namespace contains the following :func:`fread ` option groups:
7 |
8 | .. list-table::
9 | :widths: auto
10 | :class: api-table
11 |
12 | * - :class:`.log `
13 | - Logging-related options.
14 |
15 | * - :attr:`.parse_dates `
16 | - Should fread recognize date fields?
17 |
18 | * - :attr:`.parse_times `
19 | - Should fread recognize time fields?
20 |
21 |
22 | .. toctree::
23 | :hidden:
24 |
25 | log
26 | parse_dates
27 | parse_times
28 |
--------------------------------------------------------------------------------
/docs/api/options/fread/log.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xclass:: datatable.options.fread.log
3 | :qual-type: class
4 | :src: --
5 |
6 | This property controls the following logging options:
7 |
8 | .. list-table::
9 | :widths: auto
10 | :class: api-table
11 |
12 | * - :attr:`.anonymize `
13 | - Option that controls logs anonymization.
14 |
15 | * - :attr:`.escape_unicode `
16 | - Option that controls escaping of the unicode characters.
17 |
18 |
19 | .. toctree::
20 | :hidden:
21 |
22 | anonymize
23 | escape_unicode
24 |
25 |
--------------------------------------------------------------------------------
/docs/api/options/fread/log/anonymize.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.options.fread.log.anonymize
3 | :src: src/core/csv/reader.cc get_anonymize set_anonymize
4 | :cvar: doc_options_fread_log_anonymize
5 | :settable: value
6 |
7 | This option controls logs anonymization that is useful in production
8 | systems, when reading sensitive data that must not accidentally leak
9 | into log files or be printed with the error messages.
10 |
11 | Parameters
12 | ----------
13 | return: bool
14 | Current `anonymize` value. Initially, this option is set to `False`.
15 |
16 | value: bool
17 | New `anonymize` value. If `True`, any snippets of data being read
18 | that are printed in the log will be first anonymized by converting
19 | all non-zero digits to `1`, all lowercase letters to `a`,
20 | all uppercase letters to `A`, and all unicode characters to `U`.
21 | If `False`, no data anonymization will be performed.
22 |
--------------------------------------------------------------------------------
/docs/api/options/fread/log/escape_unicode.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.options.fread.log.escape_unicode
3 | :src: src/core/csv/reader.cc get_escape_unicode set_escape_unicode
4 | :cvar: doc_options_fread_log_escape_unicode
5 | :settable: value
6 |
7 | This option controls escaping of the unicode characters.
8 |
9 | Use this option if your terminal cannot print unicode,
10 | or if the output gets somehow corrupted because of the unicode characters.
11 |
12 | Parameters
13 | ----------
14 | return: bool
15 | Current `escape_unicode` value. Initially, this option is set to `False`.
16 |
17 | value: bool
18 | If `True`, all unicode characters in the verbose log will be written
19 | in hexadecimal notation. If `False`, no escaping of the unicode
20 | characters will be performed.
21 |
--------------------------------------------------------------------------------
/docs/api/options/fread/parse_dates.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.options.fread.parse_dates
3 | :src: --
4 | :cvar: doc_options_fread_parse_dates
5 | :settable: value
6 |
7 | If True, fread will attempt to detect columns of date32 type. If False,
8 | then columns with date values will be returned as strings.
9 |
10 | .. warning::
11 |
12 | This option is temporary and will be removed in the future.
13 |
--------------------------------------------------------------------------------
/docs/api/options/fread/parse_times.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.options.fread.parse_times
3 | :src: --
4 | :cvar: doc_options_fread_parse_times
5 | :settable: value
6 |
7 | If True, fread will attempt to detect columns of time64 type. If False,
8 | then columns with timestamps will be returned as strings.
9 |
10 | .. warning::
11 |
12 | This option is temporary and will be removed in the future.
13 |
--------------------------------------------------------------------------------
/docs/api/options/nthreads.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.options.nthreads
3 | :src: src/core/parallel/thread_pool.cc get_nthreads set_nthreads
4 | :cvar: doc_options_nthreads
5 | :settable: new_nthreads
6 |
7 | This option controls the number of threads used by datatable
8 | for parallel calculations.
9 |
10 | Parameters
11 | ----------
12 | return: int
13 | Current `nthreads` value. Initially, this option is set to
14 | the value returned by C++ call `std::thread::hardware_concurrency()`,
15 | and usually equals to the number of available cores.
16 |
17 | new_nthreads: int
18 | New `nthreads` value. It can be greater or smaller than the initial setting.
19 | For example, setting `nthreads = 1` will force the library into
20 | a single-threaded mode. Setting `nthreads` to `0` will restore
21 | the initial value equal to the number of processor cores.
22 | Setting `nthreads` to a value less than `0` is equivalent to requesting
23 | that fewer threads than the maximum.
24 |
--------------------------------------------------------------------------------
/docs/api/options/progress/allow_interruption.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.options.progress.allow_interruption
3 | :src: src/core/progress/_options.cc get_allow_interruption set_allow_interruption
4 | :cvar: doc_options_progress_allow_interruption
5 | :settable: value
6 |
7 | This option controls if the datatable tasks could be interrupted.
8 |
9 |
10 | Parameters
11 | ----------
12 | return: bool
13 | Current `allow_interruption` value. Initially, this option is set to `True`.
14 |
15 | value: bool
16 | New `allow_interruption` value. If `True`, datatable will be allowed
17 | to handle the `SIGINT` signal to interrupt long-running tasks.
18 | If `False`, it will not be possible to interrupt tasks with `SIGINT`.
19 |
--------------------------------------------------------------------------------
/docs/api/options/progress/callback.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.options.progress.callback
3 | :src: src/core/progress/_options.cc get_callback set_callback
4 | :cvar: doc_options_progress_callback
5 | :settable: value
6 |
7 | This option controls the custom progress-reporting function.
8 |
9 |
10 | Parameters
11 | ----------
12 | return: function
13 | Current `callback` value. Initially, this option is set to `None`.
14 |
15 | value: function
16 | New `callback` value. If `None`, then the built-in progress-reporting
17 | function will be used. Otherwise, the `value` specifies a function
18 | to be called at each progress event. The function should take a single
19 | parameter `p`, which is a namedtuple with the following fields:
20 |
21 | - `p.progress` is a float in the range `0.0 .. 1.0`;
22 | - `p.status` is a string, one of `'running'`, `'finished'`, `'error'` or
23 | `'cancelled'`;
24 | - `p.message` is a custom string describing the operation currently
25 | being performed.
26 |
--------------------------------------------------------------------------------
/docs/api/options/progress/clear_on_success.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.options.progress.clear_on_success
3 | :src: src/core/progress/_options.cc get_clear_on_success set_clear_on_success
4 | :cvar: doc_options_progress_clear_on_success
5 | :settable: value
6 |
7 | This option controls if the progress bar is cleared on success.
8 |
9 |
10 | Parameters
11 | ----------
12 | return: bool
13 | Current `clear_on_success` value. Initially, this option is set to `False`.
14 |
15 | value: bool
16 | New `clear_on_success` value. If `True`, the progress bar is cleared when
17 | job finished successfully. If `False`, the progress remains visible
18 | even when the job has already finished.
19 |
20 |
--------------------------------------------------------------------------------
/docs/api/options/progress/enabled.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.options.progress.enabled
3 | :src: src/core/progress/_options.cc get_enabled set_enabled
4 | :cvar: doc_options_progress_enabled
5 | :settable: value
6 |
7 | This option controls if the progress reporting is enabled.
8 |
9 | Parameters
10 | ----------
11 | return: bool
12 | Current `enabled` value. Initially, this option is set to `True`
13 | if the `stdout` is connected to a terminal or a Jupyter Notebook,
14 | and `False` otherwise.
15 |
16 | value: bool
17 | New `enabled` value. If `True`, the progress reporting
18 | functionality will be turned on. If `False`, it is turned off.
19 |
20 |
--------------------------------------------------------------------------------
/docs/api/options/progress/min_duration.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.options.progress.min_duration
3 | :src: src/core/progress/_options.cc get_min_duration set_min_duration
4 | :cvar: doc_options_progress_min_duration
5 | :settable: value
6 |
7 | This option controls the minimum duration of a task to show the progress bar.
8 |
9 |
10 | Parameters
11 | ----------
12 | return: float
13 | Current `min_duration` value. Initially, this option is set to `0.5`.
14 |
15 | value: float
16 | New `min_duration` value. The progress bar will not be shown
17 | if the duration of an operation is smaller than `value`.
18 | If this value is non-zero, then the progress bar will only be shown
19 | for long-running operations, whose duration (estimated or actual)
20 | exceeds this threshold.
21 |
--------------------------------------------------------------------------------
/docs/api/options/progress/updates_per_second.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.options.progress.updates_per_second
3 | :src: src/core/progress/_options.cc get_updates_per_second set_updates_per_second
4 | :cvar: doc_options_progress_updates_per_second
5 | :settable: value
6 |
7 | This option controls the progress bar update frequency.
8 |
9 |
10 | Parameters
11 | ----------
12 | return: float
13 | Current `updates_per_second` value. Initially, this option is set to `25.0`.
14 |
15 | value: float
16 | New `updates_per_second` value. This is the number of times per second
17 | the display of the progress bar should be updated.
18 |
19 |
--------------------------------------------------------------------------------
/docs/api/re.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xpy:module:: datatable.re
3 |
4 | datatable.re
5 | =============
6 |
7 | .. list-table::
8 | :widths: auto
9 | :class: api-table
10 |
11 | * - :func:`match()`
12 | - Search for a regular expression within a column.
13 |
14 |
15 |
16 | .. toctree::
17 | :hidden:
18 |
19 | match()
20 |
--------------------------------------------------------------------------------
/docs/api/re/match.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.re.match
3 | :src: src/core/expr/re/fexpr_match.cc fn_match
4 | :tests: tests/re/test-match.py
5 | :cvar: doc_re_match
6 | :signature: match(column, pattern, icase=False)
7 |
8 | Test whether values in a string column match a regular expression.
9 |
10 |
11 | Parameters
12 | ----------
13 | column: FExpr[str]
14 | The column expression where you want to search for regular
15 | expression matches.
16 |
17 | pattern: str
18 | The regular expression that will be tested against each value
19 | in the `column`.
20 |
21 |
22 | icase: bool
23 |
24 | .. x-version-added:: 1.1.0
25 |
26 | If `True`, character matching will be performed without regard to case.
27 |
28 | return: FExpr[bool8]
29 | A boolean column that tells whether the value in each row of
30 | `column` matches the `pattern` or not.
31 |
32 |
--------------------------------------------------------------------------------
/docs/api/str.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xpy:module:: datatable.str
3 |
4 | datatable.str
5 | =============
6 |
7 | .. list-table::
8 | :widths: auto
9 | :class: api-table
10 |
11 | * - :func:`len()`
12 | - Compute length of a string column.
13 |
14 | * - :func:`slice()`
15 | - Apply a slice to a string column.
16 |
17 | * - :func:`split_into_nhot()`
18 | - Split and nhot-encode a single-column frame
19 |
20 |
21 |
22 | .. toctree::
23 | :hidden:
24 |
25 | len()
26 | slice()
27 | split_into_nhot()
28 |
--------------------------------------------------------------------------------
/docs/api/str/len.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.str.len
3 | :src: src/core/expr/str/fexpr_len.cc fn_len
4 | :tests: tests/str/test-len.py
5 | :cvar: doc_str_len
6 | :signature: len(column)
7 |
8 | Compute lengths of values in a string column.
9 |
10 |
11 | Parameters
12 | ----------
13 | column: FExpr[str]
14 |
15 | return: FExpr[int64]
16 |
--------------------------------------------------------------------------------
/docs/api/stype/ctype.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.stype.ctype
3 | :src: src/datatable/types.py ctype
4 |
--------------------------------------------------------------------------------
/docs/api/stype/dtype.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.stype.dtype
3 | :src: src/datatable/types.py dtype
4 |
--------------------------------------------------------------------------------
/docs/api/stype/ltype.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.stype.ltype
3 | :src: src/datatable/types.py ltype
4 |
--------------------------------------------------------------------------------
/docs/api/stype/max.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.stype.max
3 | :src: src/datatable/types.py max
4 |
--------------------------------------------------------------------------------
/docs/api/stype/min.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.stype.min
3 | :src: src/datatable/types.py min
4 |
--------------------------------------------------------------------------------
/docs/api/stype/struct.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.stype.struct
3 | :src: src/datatable/types.py struct
4 |
--------------------------------------------------------------------------------
/docs/api/time/day.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.time.day
3 | :src: src/core/expr/time/fexpr_year_month_day.cc pyfn_year_month_day
4 | :tests: tests/time/test-year-month-day.py
5 | :cvar: doc_time_day
6 | :signature: day(date)
7 |
8 | .. x-version-added:: 1.0.0
9 |
10 | Retrieve the "day" component of a date32 or time64 column.
11 |
12 |
13 | Parameters
14 | ----------
15 | date: FExpr[date32] | FExpr[time64]
16 | A column for which you want to compute the day part.
17 |
18 | return: FExpr[int32]
19 | The day part of the source column.
20 |
21 |
22 | Examples
23 | --------
24 | >>> DT = dt.Frame([1, 1000, 100000], stype='date32')
25 | >>> DT[:, {'date': f[0], 'day': dt.time.day(f[0])}]
26 | | date day
27 | | date32 int32
28 | -- + ---------- -----
29 | 0 | 1970-01-02 2
30 | 1 | 1972-09-27 27
31 | 2 | 2243-10-17 17
32 | [3 rows x 2 columns]
33 |
34 |
35 | See Also
36 | --------
37 | - :func:`year()` -- retrieve the "year" component of a date
38 | - :func:`month()` -- retrieve the "month" component of a date
39 |
--------------------------------------------------------------------------------
/docs/api/time/month.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.time.month
3 | :src: src/core/expr/time/fexpr_year_month_day.cc pyfn_year_month_day
4 | :tests: tests/time/test-year-month-day.py
5 | :cvar: doc_time_month
6 | :signature: month(date)
7 |
8 | .. x-version-added:: 1.0.0
9 |
10 | Retrieve the "month" component of a date32 or time64 column.
11 |
12 |
13 | Parameters
14 | ----------
15 | date: FExpr[date32] | FExpr[time64]
16 | A column for which you want to compute the month part.
17 |
18 | return: FExpr[int32]
19 | The month part of the source column.
20 |
21 |
22 | Examples
23 | --------
24 | >>> DT = dt.Frame([1, 1000, 100000], stype='date32')
25 | >>> DT[:, {'date': f[0], 'month': dt.time.month(f[0])}]
26 | | date month
27 | | date32 int32
28 | -- + ---------- -----
29 | 0 | 1970-01-02 1
30 | 1 | 1972-09-27 9
31 | 2 | 2243-10-17 10
32 | [3 rows x 2 columns]
33 |
34 |
35 | See Also
36 | --------
37 | - :func:`year()` -- retrieve the "year" component of a date
38 | - :func:`day()` -- retrieve the "day" component of a date
39 |
--------------------------------------------------------------------------------
/docs/api/time/year.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xfunction:: datatable.time.year
3 | :src: src/core/expr/time/fexpr_year_month_day.cc pyfn_year_month_day
4 | :tests: tests/time/test-year-month-day.py
5 | :cvar: doc_time_year
6 | :signature: year(date)
7 |
8 | .. x-version-added:: 1.0.0
9 |
10 | Retrieve the "year" component of a date32 or time64 column.
11 |
12 |
13 | Parameters
14 | ----------
15 | date: FExpr[date32] | FExpr[time64]
16 | A column for which you want to compute the year part.
17 |
18 | return: FExpr[int32]
19 | The year part of the source column.
20 |
21 |
22 | Examples
23 | --------
24 | >>> DT = dt.Frame([1, 1000, 100000], stype='date32')
25 | >>> DT[:, {'date': f[0], 'year': dt.time.year(f[0])}]
26 | | date year
27 | | date32 int32
28 | -- + ---------- -----
29 | 0 | 1970-01-02 1970
30 | 1 | 1972-09-27 1972
31 | 2 | 2243-10-17 2243
32 | [3 rows x 2 columns]
33 |
34 |
35 | See Also
36 | --------
37 | - :func:`month()` -- retrieve the "month" component of a date
38 | - :func:`day()` -- retrieve the "day" component of a date
39 |
--------------------------------------------------------------------------------
/docs/api/type/arr32.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Type.arr32
3 | :src: src/core/types/py_type.cc PyType::array
4 | :cvar: doc_Type_arr32
5 | :signature: arr32(T)
6 |
7 | .. x-version-added:: 1.1.0
8 |
9 | Array type with 32-bit offsets. In a column of this type, every element
10 | is a list of values of type `T`.
11 |
12 |
13 | See Also
14 | --------
15 | :meth:`.arr64(T)` -- another array type, but with 64-bit offsets.
16 |
--------------------------------------------------------------------------------
/docs/api/type/arr64.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Type.arr64
3 | :src: src/core/types/py_type.cc PyType::array
4 | :cvar: doc_Type_arr64
5 | :signature: arr64(T)
6 |
7 | .. x-version-added:: 1.1.0
8 |
9 | Array type with 64-bit offsets. In a column of this type, every element
10 | is a list of values of type `T`.
11 |
12 |
13 | See Also
14 | --------
15 | :meth:`.arr32(T)` -- another array type, but with 32-bit offsets.
16 |
--------------------------------------------------------------------------------
/docs/api/type/bool8.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Type.bool8
3 | :src: --
4 | :tests: tests/types/test-bool8.py
5 |
6 | The type of a column with boolean data.
7 |
8 | In a column of this type each data element is stored as 1 byte. NA values
9 | are also supported.
10 |
11 | The boolean type is considered numeric, where ``True`` is 1 and ``False``
12 | is 0.
13 |
14 |
15 | Examples
16 | --------
17 | >>> DT = dt.Frame([True, False, None]).type
18 | >>> DT.type
19 | Type.bool8
20 | >>> DT
21 | | C0
22 | | bool8
23 | -- + -----
24 | 0 | 1
25 | 1 | 0
26 | 2 | NA
27 | [3 rows x 1 column]
28 |
--------------------------------------------------------------------------------
/docs/api/type/cat16.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Type.cat16
3 | :src: src/core/types/py_type.cc PyType::categorical
4 | :cvar: doc_Type_cat16
5 | :signature: cat16(T)
6 |
7 | .. x-version-added:: 1.1.0
8 |
9 | Categorical type with 16-bit codes. In a column of this type, every element
10 | is a value of type `T`.
11 |
12 |
13 | See also
14 | --------
15 | - :meth:`.cat8(T)` -- categorical type with 8-bit codes.
16 | - :meth:`.cat32(T)` -- categorical type with 32-bit codes.
17 |
--------------------------------------------------------------------------------
/docs/api/type/cat32.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Type.cat32
3 | :src: src/core/types/py_type.cc PyType::categorical
4 | :cvar: doc_Type_cat32
5 | :signature: cat32(T)
6 |
7 | .. x-version-added:: 1.1.0
8 |
9 | Categorical type with 32-bit codes. In a column of this type, every element
10 | is a value of type `T`.
11 |
12 |
13 | See also
14 | --------
15 | - :meth:`.cat8(T)` -- categorical type with 8-bit codes.
16 | - :meth:`.cat16(T)` -- categorical type with 16-bit codes.
17 |
--------------------------------------------------------------------------------
/docs/api/type/cat8.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xmethod:: datatable.Type.cat8
3 | :src: src/core/types/py_type.cc PyType::categorical
4 | :cvar: doc_Type_cat8
5 | :signature: cat8(T)
6 |
7 | .. x-version-added:: 1.1.0
8 |
9 | Categorical type with 8-bit codes. In a column of this type, every element
10 | is a value of type `T`.
11 |
12 |
13 | See also
14 | --------
15 | - :meth:`.cat16(T)` -- categorical type with 16-bit codes.
16 | - :meth:`.cat32(T)` -- categorical type with 32-bit codes.
17 |
--------------------------------------------------------------------------------
/docs/api/type/float32.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Type.float32
3 | :src: --
4 | :tests: tests/types/test-float.py
5 |
6 | Single-precision floating point type. This corresponds to C type ``float``.
7 | Each element of this type is 4 bytes long.
8 |
--------------------------------------------------------------------------------
/docs/api/type/float64.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Type.float64
3 | :src: --
4 | :tests: tests/types/test-float.py
5 |
6 | Double-precision IEEE-754 floating point type. This corresponds to C type
7 | ``double``. Each element of this type is 8 bytes long.
8 |
--------------------------------------------------------------------------------
/docs/api/type/int16.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Type.int16
3 | :src: --
4 | :tests: tests/types/test-int.py
5 |
6 | Integer type, corresponding to ``int16_t`` in C. This type uses 2 bytes per
7 | data element, and can store values in the range ``-32767 .. 32767``.
8 |
9 | Most arithmetic operations involving this type will produce a result of
10 | type ``int32``, which follows the convention of the C language.
11 |
--------------------------------------------------------------------------------
/docs/api/type/int32.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Type.int32
3 | :src: --
4 | :tests: tests/types/test-int.py
5 |
6 | Integer type, corresponding to ``int32_t`` in C. This type uses 4 bytes per
7 | data element, and can store values in the range ``-2,147,483,647 ..
8 | 2,147,483,647``.
9 |
10 | This is the most common type for handling integer data. When a python list
11 | of integers is converted into a Frame, a column of this type will usually
12 | be created.
13 |
14 |
15 | Examples
16 | --------
17 | >>> DT = dt.Frame([None, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55])
18 | >>> DT
19 | | C0
20 | | int32
21 | -- + -----
22 | 0 | NA
23 | 1 | 1
24 | 2 | 1
25 | 3 | 2
26 | 4 | 3
27 | 5 | 5
28 | 6 | 8
29 | 7 | 13
30 | 8 | 21
31 | 9 | 34
32 | 10 | 55
33 | [11 rows x 1 column]
34 |
--------------------------------------------------------------------------------
/docs/api/type/int64.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Type.int64
3 | :src: --
4 | :tests: tests/types/test-int.py
5 |
6 | Integer type which corresponds to ``int64_t`` in C. This type uses 8 bytes per
7 | data element, and can store values in the range ``-(2**63-1) .. (2**63-1)``.
8 |
--------------------------------------------------------------------------------
/docs/api/type/int8.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Type.int8
3 | :src: --
4 | :tests: tests/types/test-int.py
5 |
6 | Integer type that uses 1 byte per data element and can store values in the
7 | range ``-127 .. 127``.
8 |
9 | This type corresponds to ``int8_t`` in C/C++, ``int`` in python,
10 | ``np.dtype('int8')`` in numpy, and ``pa.int8()`` in pyarrow.
11 |
12 | Most arithmetic operations involving this type will produce a result of
13 | type ``int32``, which follows the convention of the C language.
14 |
15 |
16 | Examples
17 | --------
18 | >>> dt.Type.int8
19 | Type.int8
20 | >>> dt.Type('int8')
21 | Type.int8
22 | >>> dt.Frame([1, 0, 1, 1, 0]).types
23 | [Type.int8]
24 |
--------------------------------------------------------------------------------
/docs/api/type/is_array.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Type.is_array
3 | :src: src/core/types/py_type.cc is_array
4 | :cvar: doc_Type_is_array
5 |
6 | .. x-version-added:: 1.1.0
7 |
8 | Test whether this type belongs to the category of "array" types. This
9 | property returns ``True`` for :meth:`arr32(T) ` and
10 | :meth:`arr64(T) ` types only.
11 |
12 |
13 | Parameters
14 | ----------
15 | return: bool
16 |
17 |
18 | Examples
19 | --------
20 | >>> dt.Type.arr32(int).is_array
21 | True
22 | >>> dt.Type.arr64("float32").is_array
23 | True
24 | >>> dt.Type.void.is_array
25 | False
26 |
--------------------------------------------------------------------------------
/docs/api/type/is_boolean.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Type.is_boolean
3 | :src: src/core/types/py_type.cc is_boolean
4 | :cvar: doc_Type_is_boolean
5 |
6 | .. x-version-added:: 1.1.0
7 |
8 | Test whether this type belongs to the category of "boolean" types. This
9 | property returns ``True`` for :attr:`bool8 ` type only.
10 |
11 |
12 | Parameters
13 | ----------
14 | return: bool
15 |
16 |
17 | Examples
18 | --------
19 | >>> dt.Type.bool8.is_boolean
20 | True
21 | >>> dt.Type.void.is_boolean
22 | False
23 | >>> dt.Type.int8.is_boolean
24 | False
25 |
--------------------------------------------------------------------------------
/docs/api/type/is_categorical.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Type.is_categorical
3 | :src: src/core/types/py_type.cc is_categorical
4 | :cvar: doc_Type_is_categorical
5 |
6 | .. x-version-added:: 1.1.0
7 |
8 | Test whether this type is a categorical one. This
9 | property returns ``True`` for :meth:`cat8(T) `,
10 | :meth:`cat16(T) ` and :meth:`cat32(T) ` types only.
11 |
12 |
13 | Parameters
14 | ----------
15 | return: bool
16 |
17 |
18 | Examples
19 | --------
20 | >>> dt.Type.cat8(int).is_categorical
21 | True
22 | >>> dt.Type.cat32(dt.Type.str64).is_categorical
23 | True
24 | >>> dt.Type.void.is_categorical
25 | False
26 |
--------------------------------------------------------------------------------
/docs/api/type/is_compound.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Type.is_compound
3 | :src: src/core/types/py_type.cc is_compound
4 | :cvar: doc_Type_is_compound
5 |
6 | .. x-version-added:: 1.1.0
7 |
8 | Test whether this type represents a "compound" type, i.e. whether it may
9 | contain one or more dependent types. Currently, datatable implements only
10 | :meth:`arr32 ` and :meth:`arr64 ` compound
11 | types.
12 |
13 |
14 | Parameters
15 | ----------
16 | return: bool
17 |
18 |
19 | Examples
20 | --------
21 | >>> dt.Type.arr32(dt.int32).is_compound
22 | True
23 | >>> dt.Type.void.is_compound
24 | False
25 |
--------------------------------------------------------------------------------
/docs/api/type/is_float.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Type.is_float
3 | :src: src/core/types/py_type.cc is_float
4 | :cvar: doc_Type_is_float
5 |
6 | .. x-version-added:: 1.1.0
7 |
8 | Test whether this type belongs to the category of "float" types. This
9 | property returns ``True`` for :attr:`float32 ` and
10 | :attr:`float64 ` types only.
11 |
12 |
13 | Parameters
14 | ----------
15 | return: bool
16 |
17 |
18 | Examples
19 | --------
20 | >>> dt.Type.float64.is_float
21 | True
22 | >>> dt.Type.float32.is_float
23 | True
24 | >>> dt.Type.int64.is_float
25 | False
26 |
--------------------------------------------------------------------------------
/docs/api/type/is_integer.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Type.is_integer
3 | :src: src/core/types/py_type.cc is_integer
4 | :cvar: doc_Type_is_integer
5 |
6 | .. x-version-added:: 1.1.0
7 |
8 | Test whether this type belongs to the category of "integer" types. This
9 | property returns ``True`` for :attr:`int8 `,
10 | :attr:`int16 `, :attr:`int32 `, and
11 | :attr:`int64 ` types.
12 |
13 |
14 | Parameters
15 | ----------
16 | return: bool
17 |
18 |
19 | Examples
20 | --------
21 | >>> dt.Type.int8.is_integer
22 | True
23 | >>> dt.Type.int64.is_integer
24 | True
25 | >>> dt.Type.float64.is_integer
26 | False
27 |
--------------------------------------------------------------------------------
/docs/api/type/is_numeric.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Type.is_numeric
3 | :src: src/core/types/py_type.cc is_numeric
4 | :cvar: doc_Type_is_numeric
5 |
6 | .. x-version-added:: 1.1.0
7 |
8 | Test whether this type belongs to the category of "numeric" types. All
9 | boolean, integer, float and void types are considered numeric. Therefore,
10 | this method returns ``True`` for types
11 |
12 | - :attr:`bool8 `
13 | - :attr:`int8 `
14 | - :attr:`int16 `
15 | - :attr:`int32 `
16 | - :attr:`int64 `
17 | - :attr:`float32 `
18 | - :attr:`float64 `
19 |
20 |
21 | Parameters
22 | ----------
23 | return: bool
24 |
25 |
26 | Examples
27 | --------
28 | >>> dt.Type.int8.is_numeric
29 | True
30 | >>> dt.Type.float64.is_numeric
31 | True
32 | >>> dt.Type.void.is_numeric
33 | False
34 | >>> dt.Type.bool8.is_numeric
35 | True
36 | >>> dt.Type.str32.is_numeric
37 | False
38 |
--------------------------------------------------------------------------------
/docs/api/type/is_object.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Type.is_object
3 | :src: src/core/types/py_type.cc is_object
4 | :cvar: doc_Type_is_object
5 |
6 | .. x-version-added:: 1.1.0
7 |
8 | Test whether this type belongs to the category of "object" types. This
9 | property returns ``True`` for :attr:`obj64 ` type only.
10 |
11 |
12 | Parameters
13 | ----------
14 | return: bool
15 |
16 |
17 | Examples
18 | --------
19 | >>> dt.Type.obj64.is_object
20 | True
21 | >>> dt.Type.void.is_object
22 | False
23 | >>> dt.Type.int8.is_object
24 | False
25 |
--------------------------------------------------------------------------------
/docs/api/type/is_string.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Type.is_string
3 | :src: src/core/types/py_type.cc is_string
4 | :cvar: doc_Type_is_string
5 |
6 | .. x-version-added:: 1.1.0
7 |
8 | Test whether this type belongs to the category of "string" types. This
9 | property returns ``True`` for :attr:`str32 ` and
10 | :attr:`str64 ` types only.
11 |
12 |
13 | Parameters
14 | ----------
15 | return: bool
16 |
17 |
18 | Examples
19 | --------
20 | >>> dt.Type.str64.is_string
21 | True
22 | >>> dt.Type.str32.is_string
23 | False
24 | >>> dt.Type.void.is_string
25 | False
26 |
--------------------------------------------------------------------------------
/docs/api/type/is_temporal.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Type.is_temporal
3 | :src: src/core/types/py_type.cc is_temporal
4 | :cvar: doc_Type_is_temporal
5 |
6 | .. x-version-added:: 1.1.0
7 |
8 | Test whether this type belongs to the category of time-related types. This
9 | property returns ``True`` for :attr:`date32 ` and
10 | :attr:`time64 ` types only.
11 |
12 |
13 | Parameters
14 | ----------
15 | return: bool
16 |
17 |
18 | Examples
19 | --------
20 | >>> dt.Type.date32.is_temporal
21 | True
22 | >>> dt.Type.time64.is_temporal
23 | True
24 | >>> dt.Type.str32.is_temporal
25 | False
26 |
--------------------------------------------------------------------------------
/docs/api/type/is_void.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Type.is_void
3 | :src: src/core/types/py_type.cc is_void
4 | :cvar: doc_Type_is_void
5 |
6 | .. x-version-added:: 1.1.0
7 |
8 | Returns ``True`` if this type is the :attr:`void ` type.
9 |
10 |
11 | Parameters
12 | ----------
13 | return: bool
14 |
15 |
16 | Examples
17 | --------
18 | >>> dt.Type.void.is_void
19 | True
20 |
--------------------------------------------------------------------------------
/docs/api/type/max.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Type.max
3 | :src: src/core/types/py_type.cc get_max
4 | :cvar: doc_Type_max
5 |
6 | The largest finite value that this type can represent, if applicable.
7 |
8 | Parameters
9 | ----------
10 | return: Any
11 | The type of the returned value corresponds to the Type object: an int
12 | for integer types, a float for floating-point types, etc. If the type
13 | has no well-defined max value then `None` is returned.
14 |
15 |
16 | Examples
17 | --------
18 | >>> dt.Type.int32.max
19 | 2147483647
20 | >>> dt.Type.float64.max
21 | 1.7976931348623157e+308
22 | >>> dt.Type.date32.max
23 | 2146764179
24 |
25 |
26 | See also
27 | --------
28 | :attr:`.min` -- the smallest value for the type.
29 |
--------------------------------------------------------------------------------
/docs/api/type/min.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Type.min
3 | :src: src/core/types/py_type.cc get_min
4 | :cvar: doc_Type_min
5 |
6 | The smallest finite value that this type can represent, if applicable.
7 |
8 | Parameters
9 | ----------
10 | return: Any
11 | The type of the returned value corresponds to the Type object: an int
12 | for integer types, a float for floating-point types, etc. If the type
13 | has no well-defined min value then `None` is returned.
14 |
15 |
16 | Examples
17 | --------
18 | >>> dt.Type.int8.min
19 | -127
20 | >>> dt.Type.float32.min
21 | -3.4028234663852886e+38
22 | >>> dt.Type.date32.min
23 | -2147483647
24 |
25 |
26 | See also
27 | --------
28 | :attr:`.max` -- the largest value for the type.
29 |
--------------------------------------------------------------------------------
/docs/api/type/name.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Type.name
3 | :src: src/core/types/py_type.cc get_name
4 | :cvar: doc_Type_name
5 |
6 | Return the canonical name of this type, as a string.
7 |
8 | Examples
9 | --------
10 | >>> dt.Type.int64.name
11 | 'int64'
12 | >>> dt.Type(np.bool_).name
13 | 'bool8'
14 |
--------------------------------------------------------------------------------
/docs/api/type/obj64.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Type.obj64
3 | :src: --
4 | :tests: tests/types/test-obj64.py
5 |
6 | This type can be used to store arbitrary Python objects.
7 |
--------------------------------------------------------------------------------
/docs/api/type/str64.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Type.str64
3 | :src: --
4 | :tests: tests/types/test-str.py
5 |
6 | String type, where the offsets buffer uses 64-bit integers.
7 |
--------------------------------------------------------------------------------
/docs/api/type/void.rst:
--------------------------------------------------------------------------------
1 |
2 | .. xattr:: datatable.Type.void
3 | :src: --
4 | :tests: tests/types/test-void.py
5 |
6 | The type of a column where all values are NAs.
7 |
8 | In datatable, any column can have NA values in it. There is, however,
9 | a special type for a column where *all* values are NAs: ``void``. This
10 | type's special property is that it can be used in
11 | place where any other type could be expected.
12 |
13 | A column of this type does not occupy any storage space. Unlike other types,
14 | it does not use the validity buffer either: all values are known to be
15 | invalid.
16 |
17 | It converts into pyarrow's ``pa.null()`` type, or ``float64`` dtype in numpy.
18 | When converting into pandas, a Series of ``object`` type is created,
19 | consisting of python ``None`` objects.
20 |
21 |
22 | Examples
23 | --------
24 | >>> DT = dt.Frame([None, None, None])
25 | >>> DT.type
26 | Type.void
27 | >>> DT
28 | | C0
29 | | void
30 | -- + ----
31 | 0 | NA
32 | 1 | NA
33 | 2 | NA
34 | [3 rows x 1 column]
35 |
--------------------------------------------------------------------------------
/docs/develop/index-develop.rst:
--------------------------------------------------------------------------------
1 |
2 | Development
3 | ===========
4 |
5 | .. toctree::
6 | :maxdepth: 2
7 |
8 | contrib
9 | documentation
10 | create-fexpr
11 | test
12 |
--------------------------------------------------------------------------------
/docs/docutils.conf:
--------------------------------------------------------------------------------
1 | [restructuredtext parser]
2 | character_level_inline_markup: yes
3 |
--------------------------------------------------------------------------------
/docs/manual/index-manual.rst:
--------------------------------------------------------------------------------
1 |
2 | User Guide
3 | ==========
4 |
5 | .. toctree::
6 |
7 | name_mangling
8 | f-expressions
9 | fread_examples
10 | select_and_filter_data
11 | transform_data
12 | groupby_examples
13 | row_functions
14 | comparison_with_pandas
15 | comparison_with_rdatatable
16 | comparison_with_sql
17 | datetime
18 | ftrl
19 |
--------------------------------------------------------------------------------
/docs/releases/index-releases.rst:
--------------------------------------------------------------------------------
1 |
2 | Release History
3 | ===============
4 |
5 |
6 | .. toctree::
7 | :maxdepth: 1
8 |
9 | Under development
10 | v1.1.0
11 | v1.0.0
12 | v0.11.1
13 | v0.11.0
14 | v0.10.1
15 | v0.10.0
16 | v0.9.0
17 | v0.8.0
18 | v0.7.0
19 | v0.6.0
20 | v0.5.0
21 | v0.4.0
22 | v0.3.2
23 | v0.3.1
24 | v0.3.0
25 | v0.2.2
26 | v0.2.1
27 | contributors
28 |
--------------------------------------------------------------------------------
/docs/releases/v0.4.0.rst:
--------------------------------------------------------------------------------
1 |
2 |
3 | .. changelog::
4 | :version: 0.4.0
5 | :released: 2018-05-07
6 | :wheels: https://files.pythonhosted.org/packages/af/10/5f458bb24545845da3f290179a139f93c9c6966a3817fab9049f930cd5b8/datatable-0.4.0.tar.gz
7 |
8 | General
9 | -------
10 | .. current-module:: datatable
11 |
12 | -[enh] :func:`fread` now parses integers with thousands separator (for example
13 | ``1,000``).
14 |
15 | -[enh] Added option ``fread.anonymize`` which forces fread to anonymize all
16 | user input in the verbose logs / error messages.
17 |
18 | -[enh] Allow type-casts from booleans/integers/floats into strings.
19 |
20 |
21 | .. contributors::
22 |
23 | 11 @st-pasha
24 | 8 @mmalohlava
25 | 1 @abal5
26 | --
27 | 7 @st-pasha
28 | 6 @mmalohlava
29 |
--------------------------------------------------------------------------------
/docs/releases/v1.2.0.rst:
--------------------------------------------------------------------------------
1 |
2 | .. changelog::
3 | :version: 1.2.0
4 |
5 | (nothing yet)
6 |
--------------------------------------------------------------------------------
/docs/start/index-start.rst:
--------------------------------------------------------------------------------
1 |
2 | Getting Started
3 | ===============
4 |
5 | .. toctree::
6 |
7 | install
8 | quick-start
9 | using-datatable
10 |
--------------------------------------------------------------------------------
/pyproject.toml:
--------------------------------------------------------------------------------
1 | [build-system]
2 | requires = []
3 | build-backend = "ext"
4 | backend-path = ["ci"]
5 |
--------------------------------------------------------------------------------
/requirements_docs.txt:
--------------------------------------------------------------------------------
1 | docutils>=0.15
2 | pygments>=2.6
3 | sphinx>=4.0, <5.0
4 | sphinx_rtd_theme>=0.5
5 | nbsphinx>=0.5
6 | datatable
7 |
--------------------------------------------------------------------------------
/requirements_extra.txt:
--------------------------------------------------------------------------------
1 | numpy
2 | pandas
3 | pyarrow
4 | xlrd<=1.2.0
5 |
--------------------------------------------------------------------------------
/requirements_tests.txt:
--------------------------------------------------------------------------------
1 | pytest >=3.1
2 | pytest-cov
3 | docutils >=0.14
4 |
--------------------------------------------------------------------------------
/setup.cfg:
--------------------------------------------------------------------------------
1 | [metadata]
2 | license_file = LICENSE
3 | description-file = README.md
4 |
5 | [flake8]
6 | ignore = E241,E265,E302,E303,E701,D105,D202
7 | max-line-length = 80
8 | import-order-style = smarkets
9 | inline-quotes = "
10 |
11 | [tool:pytest]
12 | minversion = 3.0
13 | norecursedirs = benchmarks build c ci docs microbench temp .benchmarks .cache .git .idea .venv
14 | python_files = test_*.py test-*.py
15 | junit_family = xunit2
16 |
--------------------------------------------------------------------------------
/src/core/encodings.h:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | // This Source Code Form is subject to the terms of the Mozilla Public
3 | // License, v. 2.0. If a copy of the MPL was not distributed with this
4 | // file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | //
6 | // © H2O.ai 2018
7 | //------------------------------------------------------------------------------
8 | #ifndef dt_ENCODINGS_H
9 | #define dt_ENCODINGS_H
10 | #include
11 | #include
12 |
13 |
14 | int is_valid_utf8(const uint8_t* src, size_t len);
15 | int is_valid_utf8(const char* src, size_t len);
16 |
17 | int check_escaped_string(const uint8_t* src, size_t len, uint8_t escape_char);
18 |
19 | int decode_escaped_csv_string(const uint8_t* src, int len, uint8_t* dest, uint8_t quote);
20 |
21 | int decode_sbcs(const uint8_t* src, int len, uint8_t* dest, uint32_t *map);
22 |
23 | int64_t utf32_to_utf8(uint32_t* buf, size_t maxchars, char* ch);
24 |
25 | int read_codepoint_from_utf8(const uint8_t** src);
26 |
27 |
28 | // Defined in utils/wcwidth.cc
29 | int mk_wcwidth(int ucp);
30 |
31 | #endif
32 |
--------------------------------------------------------------------------------
/src/core/models/murmurhash.h:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | // Slightly modified Murmur hash functions that are originally written by
3 | // Austin Appleby and placed to the public domain, see
4 | // https://github.com/aappleby/smhasher
5 | //------------------------------------------------------------------------------
6 | #include
7 | #ifndef dt_MODELS_MURMURHASH_h
8 | #define dt_MODELS_MURMURHASH_h
9 |
10 |
11 | uint64_t hash_murmur2(const void *, uint64_t);
12 | void hash_murmur3(const void *, uint64_t, void *);
13 |
14 | uint64_t ROTL64(uint64_t, int8_t);
15 | uint64_t getblock64 (const uint64_t *, uint64_t);
16 | uint64_t fmix64 (uint64_t);
17 |
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/src/core/py_encodings.h:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | // This Source Code Form is subject to the terms of the Mozilla Public
3 | // License, v. 2.0. If a copy of the MPL was not distributed with this
4 | // file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | //
6 | // © H2O.ai 2018
7 | //------------------------------------------------------------------------------
8 | #ifndef dt_PY_ENCODINGS_H
9 | #define dt_PY_ENCODINGS_H
10 | #include "python/python.h"
11 | #include "encodings.h"
12 |
13 |
14 | int init_py_encodings(PyObject* module);
15 |
16 | int decode_iso8859(const uint8_t* src, int len, uint8_t* dest);
17 | int decode_win1252(const uint8_t* src, int len, uint8_t* dest);
18 | int decode_win1251(const uint8_t* src, int len, uint8_t* dest);
19 |
20 | int decode_win1252(const char* src, int len, char* dest);
21 |
22 | #endif
23 |
--------------------------------------------------------------------------------
/src/core/read/constants.h:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | // This Source Code Form is subject to the terms of the Mozilla Public
3 | // License, v. 2.0. If a copy of the MPL was not distributed with this
4 | // file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | //
6 | // © H2O.ai 2018
7 | //------------------------------------------------------------------------------
8 | #ifndef dt_READ_CONSTANTS_h
9 | #define dt_READ_CONSTANTS_h
10 | #include
11 | namespace dt {
12 | namespace read {
13 |
14 | extern const uint8_t hexdigits[256];
15 | extern const uint8_t allowedseps[128];
16 | extern const long double pow10lookup[601];
17 |
18 | }} // namespace dt::read::
19 | #endif
20 |
--------------------------------------------------------------------------------
/src/datatable/expr/math.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | #-------------------------------------------------------------------------------
3 | # Copyright 2018 H2O.ai
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #-------------------------------------------------------------------------------
17 | from datatable.lib import core
18 |
19 | __all__ = ("abs", "exp", "log", "log10", "isna")
20 |
21 | # Deprecated, use math namespace instead
22 | isna = core.isna
23 | abs = core.abs
24 | exp = core.exp
25 | log = core.log
26 | log10 = core.log10
27 |
--------------------------------------------------------------------------------
/src/datatable/re.py:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------------------------------------
2 | # Copyright 2021 H2O.ai
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #-------------------------------------------------------------------------------
16 | from datatable.lib._datatable import re_match as match
17 |
18 |
19 | __all__ = ["match"]
20 |
--------------------------------------------------------------------------------
/src/datatable/str.py:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------------------------------------
2 | # Copyright 2018 H2O.ai
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #-------------------------------------------------------------------------------
16 |
17 | from datatable.lib._datatable import (
18 | slice,
19 | split_into_nhot,
20 | str_len as len,
21 | )
22 |
23 |
24 | __all__ = [
25 | "len",
26 | "slice",
27 | "split_into_nhot"
28 | ]
29 |
--------------------------------------------------------------------------------
/src/datatable/utils/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/h2oai/datatable/3611640171e089eadf26012832936b341fda7a44/src/datatable/utils/__init__.py
--------------------------------------------------------------------------------
/tests/dt/README.md:
--------------------------------------------------------------------------------
1 |
2 | Tests for functions in the main `datatable.` namespace.
3 |
--------------------------------------------------------------------------------
/tests/types/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/h2oai/datatable/3611640171e089eadf26012832936b341fda7a44/tests/types/__init__.py
--------------------------------------------------------------------------------
/tests_random/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/h2oai/datatable/3611640171e089eadf26012832936b341fda7a44/tests_random/__init__.py
--------------------------------------------------------------------------------