So this simply combines multiple files into one data set and outputs it onto 1 sheet In an entirely new Excel file. The the basic explanation of it is that it uses Pandas accelerator to read the file name using the Open PYXL engine. The read from file is a custom function that takes the … Continue reading Combine Excel Files
Write to File
def write_to_csv(dataFrame, destpath, file_name): return dataFrame.to_csv(f'{destpath}/{file_name}.csv', index=False) def write_to_xl(dataFrame, destpath, file_name, sheet_name = '1'): return dataFrame.to_excel(f'{destpath}/{file_name}.xlsx', sheet_name=sheet_name, index=False) def write_to_xl_mul(dataFrame, destpath, file_name, sheet_name = '1'): folderpath = f'{destpath}/{file_name}.xlsx' if os.path.exists(folderpath): with pd.ExcelWriter(f'{destpath}/{file_name}.xlsx', engine='openpyxl',mode='a') as writer: dataFrame.to_excel(writer, sheet_name, index=False) return print("Path Exists") else: with open(folderpath, 'w') as file: print("Path does not exist creating....") dataFrame.to_excel(f'{destpath}/{file_name}.xlsx', sheet_name=sheet_name, index=False)
Make a Folder
This code is a very simple function that checks the folder path and determines if it exists or not. If it does then largely nothing happens, however if it detects that the folder path does ot exist then is will create one. def makeFolder(folderpath): if os.path.exists(folderpath): return print("Path Exists") else: os.makedirs(folderpath) print("Path does not exist … Continue reading Make a Folder
Read from File
This is a simple way to handle reading from an excel file be it csv or xlsx. The function takes a filepath and determines the type, be it .csv or .xlsx. From this it is able to process the file according to the type. If it is a .csv then it will look for the … Continue reading Read from File
PDF Reader
The PDF reader came about as a result of wanting to be able to cycle through a series of PDF invoices each invoice with a standard layout which meant pattern recognition across each of the PDF files would be fairly easy. It is imperative to note that because we standardized layout of each PDF invoice … Continue reading PDF Reader
Read from Excel
One of the first things that you learn from using Python is how easy it is for Python to read from Excel files be it .CSV or XLSX. The issue is knowing which function within Python libraries and there are many libraries you can use to read either the CSV or the XLSX file format. … Continue reading Read from Excel
Scraping By!!!
A simple function that was set up to get a table from a web page using the read HTML function from the HTML5Lib library in Python. The function is able to obtain the table from the web page given the web page url. The default setting is for the function to return the first table … Continue reading Scraping By!!!
Get Data!!!
The next step of the code would be to, given the file path, determine if it is a csv or a dot xlsx file. This was done using the split function in Python whereby it was split using the dot as the character that would determine where the string would be split. This works under … Continue reading Get Data!!!
Get Data!!!
The first part of this coding project would be to select the language in this case I choose to use Python not just because of the extensive libraries but the general ease of use and overall large community of online support. The first part of this little foray into using Python to get data would … Continue reading Get Data!!!
Crane : Final Assembly
Side View The crane is complete. The only thing not pictured is the block and tackle which can be attached to the base trolley mechanism. Overall all the design objectives have been achieved and tested to ensure it. Where it did not meet the original design the art was re-designed and tested again until it … Continue reading Crane : Final Assembly
Crane : The Trolley (Pt. 2 of 2)
Trolley The crane trolley is what will allow for the hooking mechanism to travel along the crane boom. The trolley can be though of having 3 major parts, the first part is the span that connects the 2 plates left and right. These plates are identical except for the fact that one of the plates … Continue reading Crane : The Trolley (Pt. 2 of 2)
Crane : Basic Assembly
For the most part we have all the major components of the crane and cane begin a fit of all the components. All the major components that were designed and re-designed can be seen. The fit and tolerances are good with all parts fitting together with no interferences or excessive gaps. Crane : Side View … Continue reading Crane : Basic Assembly
Crane : Base
The base will anchor the entire crane to the ground, it will attach itself to the mast and then further attach the crane to the ground. The crane base will have components that will be embedded in the ground. This would be accomplished via a "J" bolt, threaded at the top where it attaches to … Continue reading Crane : Base
Crane : Mast (Pt. 2 of 2)
Original Mast The mast has changed in the new re-design with the diagonal cross-member. The mast now has a a vertical force applied to the top and 45deg force applied at the point where the cross excess of the allowable material stress. Member meets the mast. This has shown to produce stresses well in excess … Continue reading Crane : Mast (Pt. 2 of 2)
The Re-Design: Swivel Mechanism (Pt. 4 of 4)
The Old Cross-Member The old assembly which has more parts and a greater amount of assembling to do, however it was found to be too complex and many of the parts were found to be lacking requiring re-design. This re-design of individual parts meant that it affected the other parts further down the design requiring … Continue reading The Re-Design: Swivel Mechanism (Pt. 4 of 4)
The Re-Design: Swivel Mechanism (Pt. 3 of 4)
Current Swivel Mechanism The current set up has a roller rolling on a conical plate to allow the boom to rotate. This was too complex and had too many parts thus it was re-designed to work with the new cross member. This old design was the trunnion rest model. A new mechanism was done up … Continue reading The Re-Design: Swivel Mechanism (Pt. 3 of 4)
The Re-Design: The Cross-member (Pt. 2 of 4)
The first part that was re-worked was the upper parts of the crossmember, the boom attachment is now a single flat plate that bolts onto the boom. This is now welded to the cylindrical section that makes up the cross member. New upper cross-member However we can see that the Material still has some stresses … Continue reading The Re-Design: The Cross-member (Pt. 2 of 4)
The Re-Design (Pt. 1 of 4)
The re-design, means that we have to find a way to get the cross member to handle the loads as well as be dis mantled. It must still bolt to the boom and at the roller rest stop is should allow the member to rotate along the rest stop. The current arrangement uses regular shapes … Continue reading The Re-Design (Pt. 1 of 4)
Upper Span Assembly & Re-Design
The upper span assembly forms the part the overall assembly that connects the boom to the cross member and then on to the brace. This piece is simple enough a simple T shape with 3 holes that position it at a 45deg to the boom when assembled. However at 11.113mm thick it still can not … Continue reading Upper Span Assembly & Re-Design
Crane : Boom Bracket
Original Design The original design was tested with 37.812kN of force in a downward direction with Armstrong 240 as the material of choice. Right of the bat we see that it is clearly unsuitable, with a maximum stress of 999.5MPa located primarily along the vertical members of the design spreading outward from that. Note that … Continue reading Crane : Boom Bracket