Skip to content

Commit 7435bf5

Browse files
committed
fix fexpr.cc
1 parent d26226e commit 7435bf5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/core/expr/fexpr.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,8 @@ DECLARE_METHOD(&PyFExpr::min)
533533

534534
oobj PyFExpr::nth(const XArgs& args) {
535535
auto nthFn = oobj::import("datatable", "nth");
536-
auto n = args[1].to<py::oobj>(py::oint(0));
536+
oobj n = args[0].to_oobj() ? args[0].to_oobj()
537+
: py::oint(0);
537538
oobj skipna = args[1].to_oobj_or_none();
538539
return nthFn.call({this, n, skipna});
539540
}

0 commit comments

Comments
 (0)