pwwang / datar

A Grammar of Data Manipulation in python

Home Page:https://pwwang.github.io/datar/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

'function' object is not subscriptable when using syntax c[1:4:1]

antonio-yu opened this issue · comments

Trying to create a dataframe , syntax c[6:1:-1] not working

df = tibble(x = c(1, 1, 1, 2, 2, 3), y = c[1:6:1], z = c[6:1:-1])
---->  df = tibble(x = c(1, 1, 1, 2, 2, 3), y = c[1:6:1], z = c[6:1:-1])
TypeError: 'function' object is not subscriptable

What does datar.get_versions() print?

python : 3.9.12 (main, Apr 4 2022, 05:22:27) [MSC v.1916 64 bit (AMD64)]
datar : 0.8.6
numpy : 1.21.5
pipda : 0.6.0
executing: 0.8.3
varname : 0.8.3
pandas : 1.4.2

You need to upgrade to v0.9.0 by pip install -U datar.

Solved