diff --git a/src/core/expr/fexpr.cc b/src/core/expr/fexpr.cc index 8b6458c9b..8d5f95f46 100644 --- a/src/core/expr/fexpr.cc +++ b/src/core/expr/fexpr.cc @@ -533,7 +533,8 @@ DECLARE_METHOD(&PyFExpr::min) oobj PyFExpr::nth(const XArgs& args) { auto nthFn = oobj::import("datatable", "nth"); - auto n = args[1].to(py::oint(0)); + oobj n = args[0].to_oobj() ? args[0].to_oobj() + : py::oint(0); oobj skipna = args[1].to_oobj_or_none(); return nthFn.call({this, n, skipna}); }