{"id":5993,"library":"mendeleev","title":"Mendeleev","description":"Mendeleev is a Python library that provides a convenient API for accessing various properties of elements, ions, and isotopes from the periodic table. It includes functionalities for data manipulation, integration with pandas for bulk data access, and visualization capabilities using libraries like Bokeh and Plotly. The library is actively maintained, with its current version being 1.1.0.","status":"active","version":"1.1.0","language":"en","source_language":"en","source_url":"https://github.com/lmmentel/mendeleev","tags":["chemistry","periodic-table","science","elements","isotopes"],"install":[{"cmd":"pip install mendeleev","lang":"bash","label":"Install latest stable version"}],"dependencies":[{"reason":"Required for command-line interface formatting.","package":"colorama","optional":false},{"reason":"Used for marking deprecated functions.","package":"deprecated","optional":false},{"reason":"Fundamental package for numerical computing, used internally for data handling.","package":"numpy","optional":false},{"reason":"Used for tabular data manipulation, especially with bulk data access functions.","package":"pandas","optional":false},{"reason":"Used for data validation and settings management.","package":"pydantic","optional":false},{"reason":"Used for ASCII art in CLI output.","package":"pyfiglet","optional":false},{"reason":"Used for syntax highlighting in CLI output.","package":"pygments","optional":false},{"reason":"ORM used for interacting with the internal SQLite database.","package":"sqlalchemy","optional":false}],"imports":[{"note":"Allows direct access to common elements as objects.","symbol":"Element objects directly (e.g., Si, Fe)","correct":"from mendeleev import Si, Fe"},{"note":"The `element` function is exposed directly at the top-level package, not within a submodule like `mendeleev.mendeleev`.","wrong":"from mendeleev.mendeleev import element","symbol":"element function","correct":"from mendeleev import element"},{"note":"Used for retrieving bulk data as pandas DataFrames from the internal database.","symbol":"fetch_table function","correct":"from mendeleev.fetch import fetch_table"}],"quickstart":{"code":"from mendeleev import element\n\n# Get an element by symbol\nsi = element(\"Si\")\n\n# Access its properties\nprint(f\"Element: {si.name} ({si.symbol})\")\nprint(f\"Atomic Number: {si.atomic_number}\")\nprint(f\"Atomic Weight: {si.atomic_weight}\")\nprint(f\"Electronic Configuration: {si.econf}\")\nprint(f\"Pauling Electronegativity: {si.electronegativity(scale='pauling')}\")\n","lang":"python","description":"This quickstart demonstrates how to import the `element` function and retrieve an element's properties such as name, atomic number, atomic weight, electronic configuration, and electronegativity."},"warnings":[{"fix":"Ensure your environment's `numpy` version is 2.0 or higher. You may need to update `numpy` explicitly: `pip install 'numpy>=2.0'`.","message":"Version 1.1.0 introduces a bump in the `numpy` dependency to `^2.0`. Projects relying on an older `numpy` version (e.g., `numpy<2.0`) will experience breakage when upgrading `mendeleev` to 1.1.0.","severity":"breaking","affected_versions":">=1.1.0"},{"fix":"Always use `from mendeleev.fetch import fetch_table` and other `fetch_` functions for bulk data access to ensure compatibility and stability.","message":"Mendeleev ships with its own SQLite database. While direct interaction is possible, the recommended way to access data in bulk is through functions in the `mendeleev.fetch` module (e.g., `fetch_table`). Bypassing these functions might lead to issues if the internal database schema changes in future versions.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Upgrade `mendeleev` to version 0.17.0 or higher to benefit from improved compatibility with `pandas` and `sqlalchemy`.","message":"Prior to v0.17.0, there were known compatibility issues with the `fetch_table` function when used with certain major versions of `pandas` and `sqlalchemy`. Although resolved in v0.17.0, users on older `mendeleev` versions might still encounter these problems.","severity":"gotcha","affected_versions":"<0.17.0"},{"fix":"Ensure you are using `mendeleev` v0.16.2 or newer to avoid potential import-related issues.","message":"In earlier versions (specifically around v0.16.1 and v0.16.2), there were reported issues with `ImportErrors` not being raised correctly or general import errors. While fixed, this suggests a historical fragility in the import mechanism that users on very old versions might encounter.","severity":"gotcha","affected_versions":"<0.16.2"}],"env_vars":null,"last_verified":"2026-04-14T00:00:00.000Z","next_check":"2026-07-13T00:00:00.000Z"}