V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
NoOneNoBody
V2EX  ›  Python

Python 有没有专门集合计算的包(轮子)?

  •  
  •   NoOneNoBody · 180 天前 · 683 次点击
    这是一个创建于 180 天前的主题,其中的信息可能已经有所发展或是发生改变。
    需求
    1. 不限集合类型,只考虑内容(值)的匹配
    例如 list/tuple/set/dict.values()/dataframe.columns 只要维度相同可以混合比较
    值的类型还是要考虑的,如 字符 '1'与整数 1 不能匹配

    2. 有序
    希望,计算结果保持输入的顺序

    自己写个 set 还是能写出来,但考虑上述两个需求,琐碎的逻辑就很多,感觉自己写越写越乱
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   929 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 19:44 · PVG 03:44 · LAX 12:44 · JFK 15:44
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.