Comments (3)
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.
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.
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)
- 1 test fails: tests/test_market_calendar.py:1155: AssertionError HOT 4
- Missing Comma in Energy and Metals Aliases List HOT 1
- missing data for dates prior to 1995-01-01 HOT 3
- 2023-10-06 is not trade day HOT 1
- XNSE 2023-06-29 missing holiday HOT 1
- importing this package alters the behavior of pandas HOT 1
- ADD XJPX as an allias for JPX HOT 1
- 2023 XHKG typhoon closures
- date_range 1min ranges from 9:31am to 4pm instead of 9:30am to 3:59pm HOT 3
- 167 errors in tests HOT 1
- Good Friday is always a holiday for CBOE/CFE even when Christmas and NYE fall on a Friday
- not compatible with pandas >= 2.0.3 HOT 11
- Nasdaq Calendar HOT 1
- Eurex does not close on German National Day HOT 1
- XCSE - General Prayers Day is not a holiday anymore in Denmark
- Please update the pandas version dependency HOT 4
- 2 tests fail: AssertionError: assert <DstTzInfo 'America/New_York' LMT-1 day, 19:04:00 STD> == zoneinfo.ZoneInfo(key='America/New_York')
- open_at_time future warning
- Juneteenth not added to the listed holidays in cme.py HOT 5
- CME globex USNewYearDay incorrect when NY is on Sunday HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pandas_market_calendars.