Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert to Python 3 #8

Open
aeturrell opened this issue Jun 18, 2020 · 4 comments
Open

Convert to Python 3 #8

aeturrell opened this issue Jun 18, 2020 · 4 comments
Assignees

Comments

@aeturrell
Copy link
Owner

No description provided.

@anita06172
Copy link

capture

I try to run the code, but there was an error. How do I fix this?
Thanks for your help

@aeturrell aeturrell self-assigned this Apr 15, 2021
@aeturrell aeturrell added the bug label Apr 15, 2021
@aeturrell
Copy link
Owner Author

aeturrell commented Apr 15, 2021

Hi @anita06172, this should be fixed in commit 41a214d. You'll need to re-download and re-install. FYI the package has been upgraded to Python 3, and support for Python 2 has been dropped.

Can you let me know if it runs? Otherwise, let me know your OS, version of Python, and IDE.

@anita06172
Copy link

Thank you @aeturrell. It works for the script that I tried to run earlier. However, I tried to run the code with my owned data, there was another error, as followed.
image
image
image
Thanks again for your help!

@aeturrell
Copy link
Owner Author

Try running the script like this:

import pandas as pd
from occupationcoder.coder import coder

if __name__ == '__main__':
    myCoder = coder.Coder()
    df = pd.read_excel('excel_test.xlsx')
    df = df.fillna('')
    df = myCoder.codedataframe(df)
    print(df)
    ...

where you can add what you need at the end. NB: I tested this as a stand alone script but not in a Jupyter notebook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants