File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -533,8 +533,7 @@ DECLARE_METHOD(&PyFExpr::min)
533533
534534oobj PyFExpr::nth (const XArgs& args) {
535535 auto nthFn = oobj::import (" datatable" , " nth" );
536- oobj n = args[0 ].to_oobj () ? args[0 ].to_oobj ()
537- : py::oint (0 );
536+ auto n = args[1 ].to <py::oobj>(py::oint (0 ));
538537 oobj skipna = args[1 ].to_oobj_or_none ();
539538 return nthFn.call ({this , n, skipna});
540539}
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ class FExpr_Nth : public FExpr_Func {
110110
111111static py::oobj pyfn_nth (const py::XArgs& args) {
112112 auto arg = args[0 ].to_oobj ();
113- auto n = args[1 ].to_oobj ( );
113+ auto n = args[1 ].to <py::oobj>( py::oint ( 0 ) );
114114 auto skipna = args[2 ].to <bool >(false );
115115 if (!n.is_int ()) {
116116 throw TypeError () << " The argument for the `nth` parameter "
You can’t perform that action at this time.
0 commit comments