Search code examples
pythonpandasiopycharm

Multiple librarys include functions with the same name


I am working on a program in python that uses both the pandas and io library's and I am running into a issue with image = Image.open(io.BytesIO(imageData)) where the io.BytesIO is trying to be used as pandas.io instead of the .BytesIO function from the io library. This leads me to ask if their is a way to change witch function corresponds to this line. I am working in pyCharm 2022.1.4.


Solution

  • I imported the io package as ior

    import io as ior
    

    then just changed io.BytesIO to ior.BytesIO