Questions tagged [python-3.7]

Version of the Python programming language released in June 27, 2018. For issues that are specific to Python 3.7. Use the more generic [python] and [python-3.x] tags where possible.

Python 3.7 was released on June 27, 2018 (PEP 537).


Use this tag if your question is specifically related to Python 3.7. Otherwise, use the following guidelines to determine which tag(s) you should add to your question:

  • If your question applies to Python in general, use only the tag.
  • If your question applies to Python 3.x but not to Python 2.x, add the tag .
  • If you aren't sure, tag your question with and mention which version you're using in the post.

References

4167 questions
1
vote
2 answers

Is there a simpler way to reserve the characters in a sentence, but keep the word order as is?

Is there a simpler way to take a sentence string and return the sentence with the order of the characters in each word reversed? Importantly, the order of the characters in the words is reversed, NOT reverse the order of words in the sentence. def…
peyo
  • 351
  • 4
  • 15
1
vote
0 answers

Cropping image according to coordinates (with scaling factor in mind)

I have a simple image file as below, where I have defined a set of coordinates, I want to crop. The cropping selection is happening on the frontend, which means that the image that the user is seeing, is scaled down to fit the user's screen. Below…
oliverbj
  • 5,771
  • 27
  • 83
  • 178
1
vote
1 answer

TypeError: "delimiter" must be a 1-character string

I am trying to read a csv file using Python 3.7 csv.reader on windows using jupyter notebook; class my_dialect(csv.Dialect): lineterminator = '\n' deliminter = ';' quotechar = '"' quoting = csv.QUOTE_MINIMAL reader = csv.reader(f,…
daiyue
  • 7,196
  • 25
  • 82
  • 149
1
vote
4 answers

Calculate number of filtered Bigrams

Working on Hands on problems on NLP and got stuck in TASK given below. Below are the statements which are required to be executed in sequence. I have completed the below steps but the fresco platform is not accepting the solution. Please let me know…
1
vote
1 answer

How to make a script restart itself if user says so at the end?

I've made a little program that scrapes links from yahoo with any keyword or phrase you want and as far as you want. I added an input at the end to ask the user if they want to input more terms and scrape more links (basically restart the program…
Ironkey
  • 2,568
  • 1
  • 8
  • 30
1
vote
2 answers

pyrcc5: No such file or directory

I want to install labelImg for mac OS in python 3.7. here is the repo: https://github.com/tzutalin/labelImg I have installed previous modules via 'pip3 install pyqt5 lxml' successfully. Cloned the repo, entered the folder 'labelImg', but only 'make…
user10229833
1
vote
4 answers

find and remove a word from sentence(in between the word matching) python

I have sentence like below mainsentence="My words aren't available give didn't give apple and did happening me" stopwords=['are','did','word', 'able','give','happen'] want to remove if any word matchs the words in between(ex: "word" should match…
vtustudent
  • 138
  • 1
  • 8
1
vote
1 answer

How to convert bytes containing a string of a list into a Python object?

I have a bytes object bytes_start containing a string of a list and I want to turn it into a Python object. bytes_start = b'"[{\\"method\\": \\"NULLABLE\\", \\"title\\": \\"Customer\\", \\"type\\": \\"STRING\\"}, {\\"method\\": \\"NULLABLE\\",…
bluetree8173
  • 59
  • 2
  • 5
1
vote
1 answer

FileNotFoundError when writing pickle file in numpy.save

I'm seeing a confusing intermittent error. Sometimes when I call np.save I'm getting FileNotFoundError. Traceback (most recent call last): File "/home/leo/anaconda3/lib/python3.7/site-packages/numpy/lib/npyio.py", line 536, in save …
Leopd
  • 41,333
  • 31
  • 129
  • 167
1
vote
0 answers

If I try to modify the current object within a function in a class in Python3.7, then why the changes aren't reflected outside the function call?

The code that is given below, shows an object oriented implementation of a linked list in Python 3.7. Here I've defined a class called Node and under this class I've defined a function delete that takes two parameters : 'this' and 'x'. Here 'this'…
1
vote
3 answers

logging error : TypeError: a bytes-like object is required, not 'str'

when I updated the python from 2.7.16 to 3.7.4 on my project,the django console show logging error as follows: --- Logging error --- Traceback (most recent call last): File "c:\python37\Lib\logging\__init__.py", line 1028, in emit …
encodingl
  • 21
  • 4
1
vote
3 answers

speech recognition for anaconda installation

I am currently trying to install speech recognition for anaconda but I am getting error (base) C:>conda install -c conda - forge/label/cf201901 Collecting package metadata (current_repodata.json): done Solving environment: failed with initial frozen…
Ikhide-Solo
  • 11
  • 1
  • 3
1
vote
1 answer

Cannot install win32core on Python 3.7 for Windows

I am trying to use some of the Windows user interface functionality of win32core but I cannot get the package installed into python. The installation fails as pep517 trys to build the wheel for win32core. I have a suspicion that win32core is only…
John
  • 19
  • 3
1
vote
0 answers

Scatter matrix plotting in Python using pandas library

Could you please let me know what is wrong with the code- import pandas as pd import numpy as np url = "https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data" # load dataset into Pandas DataFrame df = pd.read_csv(url,…
user3862410
  • 171
  • 1
  • 6
1
vote
2 answers

Replacing integers with randomly selected integers from a variable

So I have a a program that needs to generate a random set of numbers in a set format, i.g 000-00-0-0000. I have a variable called integers that has 0-9 and I need to be able to take a random selection of those integers and input them in the format,…
three
  • 21
  • 2
1 2 3
99
100