Git Product home page Git Product logo

Comments (3)

gforsyth avatar gforsyth commented on June 22, 2024

Ok, so pyarrow won't handle casts from stringy dates to date-types, but DuckDB will.

there's pyarrow.compute.strptime, but we'd have to think about how many date format strings to try before bailing out

from ibis.

NickCrews avatar NickCrews commented on June 22, 2024

I'd be fine with literally just "yyyy-mm-dd" format. I am only running into this in testing, when constructing literals. If someone else has real data they are working with, I think it wouldn't be too much to expect them to either format it that way, or convert it to a numpy datetime or a python datetime or something less ambiguous.

Related to this, but I think worth thinking about, is ideally I want to be able to create all ibis datatypes without needing to import anything. eg using the same logic as used in ibis.date(str), etc:

import ibis

ibis.memtable(
    {
        "uuid": ["9ff13914-a718-48b3-a746-5114cff95d56"],
        # "uuid": [1234],  # would be awesome to specify as an int too
        # "date": ["1970-01-01"],  # currently errors
        # "time": ["12:34:56"],  # currently errors
        # "timestamp": ["2023-01-02T03:04:05"],  # currently errors
    },
    schema={
        "uuid": "uuid",
        # "date": "date",
        # "time": "time",
        # "timestamp": "timestamp",
    },
).cache().execute()

This would make testing much easier.

from ibis.

cpcloud avatar cpcloud commented on June 22, 2024

Removing the bug label. This isn't broken functionality, it's a feature request for specific new behavior.

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.