Newest 'python-3.x' Questions - Stack Overflow

欧洲杯买球

A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Questions tagged [python-3.x]

For questions about Python programming that are specific to version 3+ of the language. Use the more generic [python] tag if your question is not version-specific. Use the [python-2.x] tags for Python 2 questions.

Filter by
Sorted by
Tagged with
0
votes
1answer
21 views

Python 3 - Issues with cosines

I am trying to solve the following formula in Python: The issue is with Python's math.cos(x). If I do math.cos(120), I get 0.8141809705265618 which is wrong. It should be -0.5. I am new to Python so ...
0
votes
0answers
7 views

How to update a default value of boolean for notification on and off in django rest framework

class NotificationOnOffSerializer(serializers.ModelSerializer): """ To create class for get account function """ is_allow_notify = serializers.BooleanField(required=True) class ...
0
votes
0answers
4 views

Wkhtmltopdf:- html document not fully loaded

I'm using python3 pdfkit to fetch data from a website called yext.com(which is slow I must admit) In order to get the data I want I need to search the site, which requires user login. So I'm creating ...
0
votes
0answers
13 views

Convert strings into floats when there is a multiplication sign [duplicate]

I have a Pandas DataFrame where a column is of the type object, that I would like to turn into type float. It consists of strings that are for ex. '2*3' that should result in '6'. At first sight this ...
0
votes
0answers
8 views

Selenium python returning the page Head but not the Body

I've been banging my head with this one for a few hours. I built a code a few weeks ago that uses python-selenium and runs on google colab to scrape a supermarket website. Everything was well and ...
0
votes
0answers
11 views

How to make python file to executable(exe) with inports

How can i make python file to executable with the imports? I tried with pyinstaller but the imports did not work. My file have imports like speech_recognition and pyttsx3 how can i get the imports ...
0
votes
3answers
28 views

How to check it's between Sunday 5:30PM and Friday 5:30PM?

How do I check if the current time is between Sunday 5:30 PM and Friday 5:30 PM? I can find the day and time ranges separately but I think the time has to be combined with the day. import datetime ...
0
votes
0answers
8 views

WxPython exit code 1073740940

I build a project with wxpython that also include multi-threading and sockets. Sometimes when I ran the project, the run is stopped and i get a strange exit code such as "Process finished with exit ...
0
votes
0answers
10 views

Split the value on a cell and update the new column with the split value row-wise using Python

I am trying to split the value on a cell and update the new column with the split value row-wise using python. Input and output given below: Original Excel Sheet New Excel Sheet to get
0
votes
2answers
18 views

How to develop lock mechanism based on operations?

I have 3 different operations: add, delete and get. While there can be any number of get operations running in parallel, there can't be any operations parallel to add and delete ie., while adding new ...
0
votes
0answers
10 views

Unexpected output while reading .csv file

Code used for reading data - pd.read_csv("bank.csv") I used head method to check some of the rows and output was like this. Why is the output of df like this?
0
votes
0answers
14 views

When I ask for 1 option, It gives me the other? [duplicate]

When I type L, for instance, to log in, it gives me the TOS (If that makes sense) Here is my code: ans2 = input('Would you like to log in (L), or view the terms of use?(TOS)') if ans2 =='L' or 'l': ...
0
votes
0answers
11 views

Missing first groupby column in the returned dataframe

I am doing a groupby on a simple DataFrame with "time, securityId, quantity, price": datag = dataf.groupby([beansy, 'securityId'], as_index=True).sum() beansy here is a datatime "bin". everything is ...
1
vote
1answer
37 views

Python 3: Convert decimals to date time [duplicate]

I have a Json with contents: { "Name": "startTime", "Value": [ { "Valid": true, "Time": 43852.491953472221 } ] } where the "Time" in decimals ...
0
votes
1answer
12 views

python: create string with various parameters

How can I create a string where the parameters can be none. def create_string(main_val, test_val=None, test_val2=None) return '%s-some_values: %s/%s/' % (main_val, test_val if test_val else '', ...

15 30 50 per page