I want to know how many records are there in a KML file. Through what Python 2 code can I know this information?

  • Try fiona: fiona.readthedocs.io/en/latest/…
    – mikewatt
    Commented Mar 15, 2022 at 18:50
  • 1
    Thanks for the question. Heads up that Stackoverflow/StackExchange discourages open-ended "how do I..." questions, and works best if you show what you've already tried (code or otherwise), and then ask how to fix it or do it better. Commented Mar 16, 2022 at 17:40

1 Answer 1


You can parse KML in Python using PYKML: https://pythonhosted.org/pykml/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.