Process finished with exit code 0 but doesn't show expected result
The code is given below:
import semopy
import pandas as pd
df = pd.read_spss(r"C:\Users\Irfan\Downloads\218.R1.sav")
replacer = {'SD': 1, 'D': 2, 'N': 3, 'A': 4, 'SA': 5}
cols = ['CBI_1', 'CBI_2', 'CBI_3', 'TRUST_1', 'TRUST_2', 'TRUST_3', 'TRUST_4', 'eWOM_1', 'eWOM_2', 'eWOM_3', 'eWOM_4',
'eWOM_5']
df[cols] = df[cols].replace(replacer)
model_spec = """
CBI =~ CBI_1 + CBI_2 + CBI_3
TRUST =~ TRUST_1 + TRUST_2 + TRUST_3 + TRUST_4
eWOM =~ eWOM_1 + eWOM_2 + eWOM_3 + eWOM_4 + eWOM_5
CBI ~ TRUST + eWOM
"""
model = semopy.Model(model_spec)
model.fit(df)
model.inspect()
Please sign in to leave a comment.
Hi,
Could you please check if the issue is IDE-related by running your code from the terminal outside of IDE?
Ah, I see.
If you run the code from .py file, please try running it in a Python console and let me know if you see the output.