Python Forum
Python Custom Module not working in Jupyter Notebook with Pandas
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Custom Module not working in Jupyter Notebook with Pandas
Hi Guys,

I have made a custom code in Python that i was to apply to a spreadsheet with Jupyter Notebook.

I get the following error code and do not understand how to fix it.

E:\OneDrive\Coding\Python\004 - Tax 3\Cont Tax\ in calculate(self)
42 percentage = percentage_list
---> 44 bracket.append(int(self.value))
46 bracket = [num for num in bracket if num <= self.value]

E:\Anaconda3\lib\site-packages\pandas\core\ in wrapper(self)
110 if len(self) == 1:
111 return converter(self.iloc[0])
--> 112 raise TypeError(f"cannot convert the series to {converter}")
114 wrapper.__name__ = f"__{converter.__name__}__"

TypeError: cannot convert the series to <class 'int'

Could someoe please take a look?

I have shared on Google Drive in the following location.

Thanks in advance.


Possibly Related Threads…
Thread Author Replies Views Last Post
  Jupyter notebooks, jupyter kernels, virtual environment created in Anaconda... bytecrunch 8 2,975 Nov-05-2023, 06:38 PM
Last Post: snippsat
  Jupyter Notebook TypeError Holidays entity loader class bmanning20 0 2,976 Jul-20-2023, 06:52 PM
Last Post: bmanning20
  Why does graph look different in Codecademy and Jupyter Notebook abc123456 1 1,621 Mar-29-2023, 09:22 AM
Last Post: newbieAuggie2019
  Setting up and integrating Jupyter Notebook development environment with VSC Drone4four 3 2,144 Sep-12-2022, 09:18 AM
Last Post: Drone4four
Thumbs Up can't access data from URL in pandas/jupyter notebook aaanoushka 1 2,012 Feb-13-2022, 01:19 PM
Last Post: jefsummers
Exclamation Jupyter Notebook - Help Needed! eyadfr 1 1,978 Jan-26-2022, 06:42 PM
Last Post: jefsummers
  Help needed with Jupyter Notebook eyadfr 4 2,335 Jan-04-2022, 08:20 PM
Last Post: snippsat
  Pandas replace function not working on datafram with floats bcrypto 1 3,170 Apr-12-2021, 08:59 PM
Last Post: bcrypto
  HELP! Importing json file into csv into jupyter notebook vilsef 2 2,745 Jan-22-2021, 11:06 AM
Last Post: snippsat
  How can draw a real-time marker on map using folium/leaflet Jupyter notebook C3PO 0 2,547 Dec-22-2020, 07:04 PM
Last Post: C3PO

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020