Posts by user2535338 • 169 points
9 posts
-
1
votes1
answer2433
viewsQ: Graph using python-igraph with attributes per node and edges
Talk people! I’m trying to create a graph using the Python-Igraph library. Each node would have an attribute, for example, in a book graph whose nodes would be books and the attributes of those…
-
0
votes2
answers49
viewsQ: Knowing the type of return of a given
I have a problem with the return type of a data in python. I was first trying : >>> type(record[0][keys[2]]) <class 'Bio.Entrez.Parser.StringElement'> I tried to check by if…
-
0
votes1
answer37
viewsQ: Type of a data structure
I am trying to count the amount of dictionaries exists in a list. However the condition always of false in the if. >>> type(record['TranslationStack'][0]) <class…
-
0
votes0
answers210
viewsQ: How to access Tupla elements?
How to access the elements of this tuple: StringElement('24929426', attributes={'IdType': 'pubmed'}) I want to extract the attributes: '24929426' 'IdType': 'pubmed' The excerpt of the code that…
-
0
votes1
answer367
viewsQ: Break lines with regex
I’m having a problem separating lines from several files txt. These files have a specific pattern but there are files that do not respect it. These are some of the 5000 files I’m trying to read:…
-
3
votes1
answer95
viewsQ: Replace words
I wonder how I compact the lines of a txt. For example the lines are broken by \n but are still part of the same sentence. SOCIAL HISTORY:Denies tobacco or alcohol use. PHYSICAL EXAMINATION: VITAL…
-
0
votes1
answer52
viewsQ: Python procedure for Problem class
I’m having trouble turning a function into a python class: from bs4 import BeautifulSoup from selenium import webdriver import html2text # driver.page_source = driver.get())# def getPEP(strg):…
-
0
votes1
answer256
viewsQ: Dictionary in python
Good morning! I’m having trouble breaking down the information and dictionary in python. My dictionary is a Biopython-generated dictionary like the one below: {'LastUpdate': '2016/11/11 04:34',…
-
2
votes1
answer126
viewsQ: Webdriver error in Python3.5 Attributeerror: can’t set attribute
I need to download the contents of a website. I made a code in python 3.5. When I turn it only to a single page the code works very well but when I put it in a loop or function it gives error. The…