Skip to content

SearchEngine Journal Clustering code error.  #6

Open
@sureshkumargondi

Description

@sureshkumargondi

Lee, thank you for all the awesome work you do.

Gratitude for it.

Just trying out your code and there is an following error. I always try to solve it by searching on the web.

And I did tried to upload my own sample and also your own sample data of keywords too. Same issue.

So thought of asking you here.

AttributeError                            Traceback (most recent call last)
[<ipython-input-44-c0aaa49db967>](https://0oauy9fmg1cc-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20220310-060047-RC01_433765713#) in <module>()
     19 
     20 for bom, enc in codec_enc_mapping.items():
---> 21     if contents.startswith(bom):
     22         encoding_type = enc
     23         is_unicode = True

[/usr/local/lib/python3.7/dist-packages/pandas/core/generic.py](https://0oauy9fmg1cc-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20220310-060047-RC01_433765713#) in __getattr__(self, name)
   5485         ):
   5486             return self[name]
-> 5487         return object.__getattribute__(self, name)
   5488 
   5489     def __setattr__(self, name: str, value) -> None:

AttributeError: 'Series' object has no attribute 'startswith'

Any help what's the issue and how it can be solved?

Thanks
Suresh

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions