Git Product home page Git Product logo

Comments (3)

rsheftel avatar rsheftel commented on May 28, 2024

I am not able to replicate your error. With a clean install of python I get the following proper functionality. What is your pandas version, perhaps that is causing an issue. The version in my example below is 0.22

Python 3.4.3 (default, Sep 14 2016, 12:36:27) 
Type "copyright", "credits" or "license" for more information.

IPython 1.2.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: import pandas_market_calendars as mcal

In [2]: mcal.__version__
Out[2]: '0.21.1'

In [3]: nyse = mcal.get_calendar('NYSE')

In [4]: schedule = nyse.schedule('2018-11-01','2018-11-30')

In [5]: schedule
Out[5]: 
                         market_open              market_close
2018-11-01 2018-11-01 13:30:00+00:00 2018-11-01 20:00:00+00:00
2018-11-02 2018-11-02 13:30:00+00:00 2018-11-02 20:00:00+00:00
2018-11-05 2018-11-05 14:30:00+00:00 2018-11-05 21:00:00+00:00
2018-11-06 2018-11-06 14:30:00+00:00 2018-11-06 21:00:00+00:00
2018-11-07 2018-11-07 14:30:00+00:00 2018-11-07 21:00:00+00:00
2018-11-08 2018-11-08 14:30:00+00:00 2018-11-08 21:00:00+00:00
2018-11-09 2018-11-09 14:30:00+00:00 2018-11-09 21:00:00+00:00
2018-11-12 2018-11-12 14:30:00+00:00 2018-11-12 21:00:00+00:00
2018-11-13 2018-11-13 14:30:00+00:00 2018-11-13 21:00:00+00:00
2018-11-14 2018-11-14 14:30:00+00:00 2018-11-14 21:00:00+00:00
2018-11-15 2018-11-15 14:30:00+00:00 2018-11-15 21:00:00+00:00
2018-11-16 2018-11-16 14:30:00+00:00 2018-11-16 21:00:00+00:00
2018-11-19 2018-11-19 14:30:00+00:00 2018-11-19 21:00:00+00:00
2018-11-20 2018-11-20 14:30:00+00:00 2018-11-20 21:00:00+00:00
2018-11-21 2018-11-21 14:30:00+00:00 2018-11-21 21:00:00+00:00
2018-11-23 2018-11-23 14:30:00+00:00 2018-11-23 18:00:00+00:00
2018-11-26 2018-11-26 14:30:00+00:00 2018-11-26 21:00:00+00:00
2018-11-27 2018-11-27 14:30:00+00:00 2018-11-27 21:00:00+00:00
2018-11-28 2018-11-28 14:30:00+00:00 2018-11-28 21:00:00+00:00
2018-11-29 2018-11-29 14:30:00+00:00 2018-11-29 21:00:00+00:00
2018-11-30 2018-11-30 14:30:00+00:00 2018-11-30 21:00:00+00:00

from pandas_market_calendars.

zizhe-xia avatar zizhe-xia commented on May 28, 2024

I am not able to replicate your error. With a clean install of python I get the following proper functionality. What is your pandas version, perhaps that is causing an issue. The version in my example below is 0.22

Python 3.4.3 (default, Sep 14 2016, 12:36:27) 
Type "copyright", "credits" or "license" for more information.

IPython 1.2.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: import pandas_market_calendars as mcal

In [2]: mcal.__version__
Out[2]: '0.21.1'

In [3]: nyse = mcal.get_calendar('NYSE')

In [4]: schedule = nyse.schedule('2018-11-01','2018-11-30')

In [5]: schedule
Out[5]: 
                         market_open              market_close
2018-11-01 2018-11-01 13:30:00+00:00 2018-11-01 20:00:00+00:00
2018-11-02 2018-11-02 13:30:00+00:00 2018-11-02 20:00:00+00:00
2018-11-05 2018-11-05 14:30:00+00:00 2018-11-05 21:00:00+00:00
2018-11-06 2018-11-06 14:30:00+00:00 2018-11-06 21:00:00+00:00
2018-11-07 2018-11-07 14:30:00+00:00 2018-11-07 21:00:00+00:00
2018-11-08 2018-11-08 14:30:00+00:00 2018-11-08 21:00:00+00:00
2018-11-09 2018-11-09 14:30:00+00:00 2018-11-09 21:00:00+00:00
2018-11-12 2018-11-12 14:30:00+00:00 2018-11-12 21:00:00+00:00
2018-11-13 2018-11-13 14:30:00+00:00 2018-11-13 21:00:00+00:00
2018-11-14 2018-11-14 14:30:00+00:00 2018-11-14 21:00:00+00:00
2018-11-15 2018-11-15 14:30:00+00:00 2018-11-15 21:00:00+00:00
2018-11-16 2018-11-16 14:30:00+00:00 2018-11-16 21:00:00+00:00
2018-11-19 2018-11-19 14:30:00+00:00 2018-11-19 21:00:00+00:00
2018-11-20 2018-11-20 14:30:00+00:00 2018-11-20 21:00:00+00:00
2018-11-21 2018-11-21 14:30:00+00:00 2018-11-21 21:00:00+00:00
2018-11-23 2018-11-23 14:30:00+00:00 2018-11-23 18:00:00+00:00
2018-11-26 2018-11-26 14:30:00+00:00 2018-11-26 21:00:00+00:00
2018-11-27 2018-11-27 14:30:00+00:00 2018-11-27 21:00:00+00:00
2018-11-28 2018-11-28 14:30:00+00:00 2018-11-28 21:00:00+00:00
2018-11-29 2018-11-29 14:30:00+00:00 2018-11-29 21:00:00+00:00
2018-11-30 2018-11-30 14:30:00+00:00 2018-11-30 21:00:00+00:00

Thanks. The thing is that it also works on my PC, but not on the linux server, which is really strange.

from pandas_market_calendars.

rsheftel avatar rsheftel commented on May 28, 2024

That is odd. One thing to check is the version of pandas on the linux server. The error looks like it is from pandas as perhaps the functionality of something in pandas changed with a version and your linux server is on an older version than your PC. This is just a guess.

from pandas_market_calendars.

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.