Use .items instead (Python 3.11)
See original GitHub issueI wrote the code below which can be found here
#make a bar graph of the df using Altair
alt.Chart(df).mark_bar().encode(
x = 'community_board', #x axis is encoded by the Bronx community boards
y='count()',
)
The graphic appears in Visual Code Notebook however VS and github displays the below error message
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/altair/utils/core.py:317: FutureWarning: iteritems is deprecated and will be removed in a future version. Use .items instead.
for col_name, dtype in df.dtypes.iteritems():
Thoughts?
Please follow these steps to make it more efficient to solve your issue:
- Since Altair is a Python wrapper around the Vega-Lite visualization grammar, most bugs should be reported directly to Vega-Lite. You can click the Action Button of your Altair chart and “Open in Vega Editor” to create a reproducible Vega-Lite example and see if you get the same error in the Vega Editor.
- Search for duplicate issues.
- Use the latest version of Altair.
- Describe how to reproduce the bug and include the full code and data to reproduce it, ideally using a sample data set from
vega_datasets
.
Issue Analytics
- State:
- Created 10 months ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
What's New In Python 3.11 — Python 3.11.1 documentation
This article explains the new features in Python 3.11, compared to 3.10. ... Code Objects, which may result in a small increase in...
Read more >Python 3.11: Cool New Features for You to Try - Real Python
In this tutorial, you'll explore what Python 3.11 brings to the table. ... Instead of using gather() , you use a context manager...
Read more >When should you upgrade to Python 3.11?
Instead of one massive scary upgrade event every few years, it's much safer to have a continuous, ongoing process of smaller upgrades. Whenever ......
Read more >You Are Going To Like These New Features In Python 3.11
Python 3.11 is almost here! Not all of the changes are immediately noticeable when you look through the release notes.
Read more >What's new in Python 3.11? - DeepSource
To make tracebacks even more context rich, Python 3.11 allows you to add notes to exception objects, which get stored in the exceptions,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry missed to reply here. I think a minor release would be nice in theory, but probably not worth the effort since we would need to sort out which commits should go into it and maybe even rebase the main repo to reorder the commits accordingly since we have added all new functionality into the main branch right now. I think our time is better spent fixing the outstanding issues for the next major release.
@mattijn @joelostblom Would it make sense to have a mini-release (like 4.2.1) fixing this
iteritems
issue but not adding all the other Altair 5 bells and whistles? Not sure if that’s even possible or not.