Giter Club home page Giter Club logo

Comments (3)

cpcloud avatar cpcloud commented on June 9, 2024 3

How about this?

In [29]: from ibis.interactive import *

In [30]: t = ibis.examples.penguins.fetch()

In [31]: t[0].concat(*(t[c].cast("string") for c in t.columns[1:]))
Out[31]:
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ StringConcat()                           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ string                                   │
├──────────────────────────────────────────┤
│ AdelieTorgersen39.118.71813750male2007   │
│ AdelieTorgersen39.517.41863800female2007 │
│ AdelieTorgersen40.318.01953250female2007 │
│ AdelieTorgersen2007                      │
│ AdelieTorgersen36.719.31933450female2007 │
│ AdelieTorgersen39.320.61903650male2007   │
│ AdelieTorgersen38.917.81813625female2007 │
│ AdelieTorgersen39.219.61954675male2007   │
│ AdelieTorgersen34.118.119334752007       │
│ AdelieTorgersen42.020.219042502007       │
│ …                                        │
└──────────────────────────────────────────┘

from ibis.

lostmygithubaccount avatar lostmygithubaccount commented on June 9, 2024

in the (potential) absence of a direct way to do this in Ibis expressions, I'd recommend using table.sql() to run the existing SQL string directly: https://ibis-project.org/how-to/extending/sql#table.sql

from ibis.

cpcloud avatar cpcloud commented on June 9, 2024

Perhaps there's room for an API to make this even more succinct?

t[0].concat(*t.exprs[1:])

The new API being the exprs property. Very much in spitball phase.

from ibis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.