• Register

Recent questions tagged python

0 votes
1 answer 20 views
I am new to this. I just want to know how to do that?
asked Nov 17 TeamScript 3k points
0 votes
1 answer 11 views
I am new. Please help me. solve this problem.
asked Nov 17 TeamScript 3k points
0 votes
1 answer 110 views
Problem: I am trying deletesome column and convert some value to column with df2.drop(df2.columns[[0, 1, 3]], axis=1, inplace=True) df2['date'] = df2['date'].map(lambda x: str(x)[1:]) df2['date'] = df2['date'].str.replace(':', ' ', 1) ... : A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead What's the problem?
asked Nov 14 sasha 2.3k points
0 votes
1 answer 9 views
Problem: So I know that I should avoid using globals in the first place because of confusion like this, but if I were to use them, could I use them correctly? (I am trying to call a global copy of a variable created in a separate function.) x = somevalue def func_A ... me i am in a search of answer actually i donot have idea that how to define vaiable globally and how i can edit its value anyone ?
asked Nov 10 Han Li 710 points
0 votes
1 answer 13 views
Problem: I am a new student in learning python and i am not sure how to check if a list is empty in python. For example, if the following is passed: a = [] How to check if it is empty?
asked Nov 5 Han Li 710 points
0 votes
1 answer 16 views
Problem: I'm trying to run a code: f=np.loadtxt('Single Small Angle 1.txt',unpack=True,skiprows=2) g=np.loadtxt('Single Small Angle 5.txt',unpack=True,skiprows=2) x = f-g[:,:11944] t=range(len(x)) m=math.log10(abs(x)) np.polyfit(t,m)plt.plot(t,abs(x)) plt.show() m=math.log10(abs(x)) TypeError: only length-1 arrays can be converted to Python scalars. I'm just not sure how to fix my problem.
asked Nov 5 Han Li 710 points
0 votes
1 answer 16 views
Problem: I am getting an error when running the python program: Traceback (most recent call last):   File "C:\Program Files (x86)\Wing IDE 101 4.1\src\debug\tserver\_sandbox.py", line 110, in <module>   File "C:\Program Files (x86)\Wing IDE 101 4.1 ... \inventory.py", line 17, in __init__ builtins.NameError: global name 'xrange' is not defined The game starts from here. What is causing this error?
asked Nov 5 Han Li 710 points
0 votes
1 answer 13 views
Problem: I am getting this error when trying to clear the JSON data, save it to another JSON file and finally convert it to a CSV file: for data1 to n: TypeError: int object is not repeated This is my code: import json import csv with open('leap_data.json') as f:     data = ... .writerow(data_1[0].keys()) for row in data_1:         output.writerow(row.values()) Please tell me how to get rid of it.
asked Nov 5 Han Li 710 points
0 votes
1 answer 8 views
I want to be a Python and Django full stack web developer but I don&rsquo;t know where to start from so, it will be good if someone can guide me properly also help me to learn the strategies too. Regards, Sasha
asked Nov 4 sasha 2.3k points
0 votes
1 answer 16 views
Problem Hi Kodlogs, How do I check if a file exists in python? Need help please.
asked Nov 3 hashq 1.1k points
0 votes
1 answer 10 views
Problem Hello Kodlogs, I have been looking for a python program to merge two lists and sort it. I have found certain code snippets online but I am new to Python and want a simple program with basic explanation. Help will be appreciated. Thanks
asked Nov 3 hashq 1.1k points
0 votes
1 answer 10 views
it will be of great help ,if you define what is __repr__ in python...
asked Nov 3 user1 160 points
0 votes
1 answer 20 views
Problem Hello Kodlogs, How I check for duplicates in a list in Python? Need help
asked Oct 31 hashq 1.1k points
0 votes
1 answer 18 views
Problem Hello Kodlogs, What is meant by EOFError in Python?
asked Oct 31 hashq 1.1k points
0 votes
1 answer 21 views
Problem: What is the basic Slicing and Advanced Indexing in NumPy Python?
asked Oct 31 john 580 points
0 votes
1 answer 14 views
Problem Hello Kodlogs, What is a checkbox called in tkinter? I heard it is called checkButton if yes, how does it function. Can you please explain with a code example?
asked Oct 30 hashq 1.1k points
0 votes
1 answer 11 views
Problem Hello Kodlogs, I am looking for code to create text input box in Python. I have seen code snippets but none of provide step by step instructions on how to do it. Please help.
asked Oct 30 hashq 1.1k points
0 votes
1 answer 10 views
Problem Hello Kodlogs, I want to create a stopwatch program in Python? A code will explanation will be appreciated. Thanks
asked Oct 30 hashq 1.1k points
0 votes
1 answer 13 views
Problem Hi Kodlogs, How do I detect emotions in Python? Any help will be appreciated. Thanks
asked Oct 30 hashq 1.1k points