Skip to content

Commit

Permalink
Fix subset-cols issue with downcasting
Browse files Browse the repository at this point in the history
  • Loading branch information
alanmarazzi committed Aug 12, 2019
1 parent e4ca714 commit cafd377
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject panthera "0.1-alpha.15"
(defproject panthera "0.1-alpha.16"
:description "Data Frames in Clojure (with Pandas) + NumPy"
:url "https://github.com/alanmarazzi/panthera"
:scm {:name "git" :url "https://github.com/alanmarazzi/panthera"}
Expand Down
5 changes: 4 additions & 1 deletion src/panthera/pandas/generics.clj
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,10 @@
;2 6 8
```"
[df & colnames]
(py/get-item df colnames))
(let [cols (if (= 1 (count colnames))
(first colnames)
(apply py/->py-list [colnames]))]
(py/get-item df cols)))

(defn n-largest
"Return the first `:n` values ordered by `:columns` in descending order.
Expand Down

0 comments on commit cafd377

Please sign in to comment.