Posts by Matheus • 501 points
21 posts
-
1
votes1
answer113
viewsA: Transpose list of objects
Step-by-step resolution: Step 1: I passed the list to a DataTable pre-formatted (equal to image of the question). var dtable = new DataTable(); dtable.Columns.Add("Mercado",…
-
0
votes1
answer113
viewsQ: Transpose list of objects
How can I transpose the columns of a table like the one in the image below For this format: Mercado | Semana 5 | Semana 6 FUT AUD | 0.9986 | 1.0035 FUT CAD | 1.0000 | 1.0062 FUT CHF | 1.0059 |…
-
5
votes2
answers812
viewsQ: Get previous element in foreach
It is possible to take an element from the previous to current position using the repeat loop foreach? For example, whenever I need to take an element previous to the current position of the loop, I…
-
1
votes0
answers69
viewsQ: Pyqt5 - Mainwindow opens and then closes
main py. (dialog) if __name__ == '__main__': try: import sys from user_interface.ui.login import Ui_Dialog from PyQt5 import QtCore, QtGui, QtWidgets app = QtWidgets.QApplication(sys.argv)…
-
1
votes0
answers371
viewsQ: Python session system
There is, in Python, a session system as exists in PHP? I need to do an access control for an application developed in Python that uses database. I have already developed a similar project (but web)…
-
-1
votes1
answer289
viewsQ: Consultation in public database
I need to perform queries in an online database, and turn the returned data into a data frame. I used an existing example on the database website, but I have no idea how to turn it into a database.…
-
3
votes1
answer282
viewsQ: Doubts about virtualenv
I’m starting development with virtualenv and some doubts have arisen, are they: Python scripts need to be inside the virtual environment folder? In the Pycharm IDE, you need to configure something…
-
0
votes0
answers218
viewsQ: Compile py code for exe
I need to compile the script in python to make it . exe, but only with the pure Python kernel, which does not have most of the libraries I used to develop. The kernel I use for development, is…
-
3
votes1
answer92
viewsQ: Python - Qdate to datetime conversion
I need to convert an input date by a Qcalendar to datetime (from lib datetime). How can I do it?
-
1
votes1
answer186
viewsQ: Slice proportional to dataframe size
How can I perform a Slice on the dataframe according to its line size? For example: if the dataframe has 14 lines, divide into 2 parts of 7, if it has 28 lines, divide into 3 parts of 7, and so on.…
-
1
votes1
answer1838
viewsQ: Division between column values and rows using pandas
I created a table pivot containing some values, but I do not know if it is necessary to use pivot table in this case below is a sample of the results: Valor ajuste \ Data posicao 2017-05-30…
-
2
votes1
answer4262
viewsQ: Latex and Python integration
I need to generate and save a PDF file with some data I treated in a script I did to generate report, however, I do not know how to do it. Do these data need to go through a . tex file before…
-
4
votes1
answer725
viewsA: Remove duplicate dates by summing the values
I managed to solve the problem, so I will answer to help anyone who has to face the same problem in the future. Follow the explanation with the code: Generating the dataframe from an existing…
-
2
votes1
answer725
viewsQ: Remove duplicate dates by summing the values
I need to remove duplicate dates from the dataframe and add the values corresponding to those dates. I found an answer in the NA stack that approaches what I need, but I couldn’t shape it for my…
-
2
votes2
answers1095
viewsQ: Add a new value at the beginning of a pandas series
How do I add a new value to a pandas series? I made the copy of the dataframe series and now I need to add a new value to the series swap_hoje, but instead of being at the end of the series, I need…
-
1
votes1
answer608
viewsQ: Change encoding in pd.to_datetime
wondered if there is the possibility to change the encoding of an element returned by the function to_datetime pandas. I need to switch to ISO-8859-1 encoding to compare the date with others that…
-
7
votes1
answer3139
viewsQ: Python integration with C#
Is there any way to integrate C# and Python 3? I need to create graphical application in a practical and fast way. Currently, I have the scripts in Python working 100%, now what I need is to take…
-
0
votes1
answer96
viewsQ: Average True Range Calculation
I have the following problem: I performed the calculation of ATR (Average True Range) using numpy library, there was no code problem (exception, etc...) however, the result shows a small decimal…
-
3
votes2
answers3673
viewsQ: Linear regression with python
I need to do the linear regression calculation, but I read that there is no possibility to use/install scipy in windows. Is there any other scipy-like library to perform this kind of calculation? Or…
-
0
votes1
answer741
viewsQ: Create dataframe tuples generated by Pandas
Is it possible to generate a tuple that stores the values of the lines of a dataframe generated by pandas? I uploaded the values of a CSV file to a dataframe, now I need to perform some calculations…
-
0
votes1
answer4423
viewsQ: CSV file reading and data storage in a vector
I have the following difficulty: I need to read the data that is inside a CSV file and store it in an array to perform calculations with such data, but I don’t know how to do it. I’m using Python…