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
  Setting up and integrating Jupyter Notebook development environment with VSC Drone4four 3 667 Sep-12-2022, 09:18 AM
Last Post: Drone4four
Thumbs Up can't access data from URL in pandas/jupyter notebook aaanoushka 1 1,030 Feb-13-2022, 01:19 PM
Last Post: jefsummers
Exclamation Jupyter Notebook - Help Needed! eyadfr 1 1,113 Jan-26-2022, 06:42 PM
Last Post: jefsummers
  Help needed with Jupyter Notebook eyadfr 4 1,115 Jan-04-2022, 08:20 PM
Last Post: snippsat
  Pandas replace function not working on datafram with floats bcrypto 1 1,827 Apr-12-2021, 08:59 PM
Last Post: bcrypto
  HELP! Importing json file into csv into jupyter notebook vilsef 2 1,647 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 1,792 Dec-22-2020, 07:04 PM
Last Post: C3PO
  Unable to install dataprep on my python notebook simplexity 0 2,564 Oct-11-2020, 01:59 AM
Last Post: simplexity
  AttributeError: (“module 'pandas' has no attribute 'rolling_std'” Mariana136 4 6,424 Sep-23-2019, 12:56 PM
Last Post: Mariana136
  How to change working directory in Jupyter Notebook? rajeev1729 2 20,094 Aug-25-2019, 07:25 PM
Last Post: perfringo

Forum Jump:

User Panel Messages

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