Module not callable in python in the following code?

0 votes
mport pandas as pd
import xlsxwriter as xw

input_string = input("Enter a list numbers:")
data = input_string.split( )
print("user list is", data)
df = pd.DataFrame(data, columns=[0])
Left = df[0].str[:1]
print(Left)
# datatoexcel=pd.ExcelWriter("ben.xlsx",engine="xlsxWriter")
# data.to_excel(datatoexcel,sheet_name='sheet1')
# datatoexcel.save()
workbook = xw.workbook("assign.xlsx")
sheet = workbook.add_worksheet("project")
row = 0
column = 0
for item in data:
    sheet.write(row, column, item)
    row += 1
workbook.close( )
May 22 in Python by Ratan
• 120 points
103 views

Hi, @Ratan,

This error statement TypeError: 'module' object is not callable is raised as you are being confused about the Class name and Module name. The problem is in the import line. You are importing a module, not a class. This happens because the module name and class name have the same name.

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Python

0 votes
1 answer

i am normalizing the data set iris in python and get the error ::TypeError: 'numpy.float64' object is not callable

TRY THIS   #Nomalisation for i in names:     print(i)   ...READ MORE

answered Aug 19, 2019 in Python by Noel Deepak Palle
1,862 views
+1 vote
2 answers

Not able to install speech_recognition in python: ModuleNotFoundError: No module named 'speech_recognition'

Hey. You have to use SpeechRecognition as module ...READ MORE

answered Nov 28, 2018 in Python by Omkar
• 69,060 points
8,159 views
0 votes
1 answer

What are the best IDE/platform to write code in Python

Just as any other programming language, even ...READ MORE

answered May 28, 2019 in Python by Harsh
• 260 points
102 views
0 votes
1 answer

What does the penup() do in Python(turtle module)

penup() basically makes sure that the moving ...READ MORE

answered Jun 21, 2019 in Python by Iris
194 views
0 votes
1 answer

How to resolve the typeerror in python os module?

TypeError - because the argument doesn't have ...READ MORE

answered Jul 31, 2019 in Python by Mohammad
• 3,230 points
101 views
0 votes
1 answer
0 votes
1 answer

Is it possible to find the source code of built-in functions of Python?

Since Python is open source you can ...READ MORE

answered Jul 17, 2019 in Python by Neel
• 3,010 points
449 views
0 votes
0 answers

What is the logic to check if a number is prime or not in python?

I am looking for a function with ...READ MORE

Aug 2, 2019 in Python by Waseem
• 4,530 points
53 views
+1 vote
0 answers

how to match the following string without a regular expression in python

abc_pqr_0_114_004.xxx ab_pq_04_114.xxx READ MORE

Dec 17, 2019 in Python by Rajesh Babu
• 130 points
176 views
0 votes
1 answer