![]() ![]() (Jan-01-2021, 07:31 AM)SunWers Wrote: (Jan-01-2021, 06:52 AM)palladium Wrote: Easiest way to find out is to print out the dataframe and see how many columns you get. So I was thinking it needed to be converted over first. ![]() xlsx file? I was thinking it should be able to but I couldn't find anything about how to import the. runfile('C:/Users/vhubb/Documents/Python Scripts/temp.py', wdir='C:/Users/vhubb/Documents/Python Scripts')Ĭ:\Users\vhubb\Documents\Python Scripts\temp.py:37: ParserWarning: Falling back to the 'python' engine because the 'c' engine does not support regex separators (separators > 1 char and different from '\s+' are interpreted as regex) you can avoid this warning by specifying engine='python'.ĭf = pd.read_csv(in_filename, sep="None")If I'm understanding you right, you said panda's can write directly to a. I just tried adding "sep = None" and this is the error message I get. Pandas can also directly write to an Excel file, fyi. The solution may be to use sep = None, this will force the Python engine which can automatically detect the separator (read the docs for details). I can't see any ' ' delimiters in your text file, though. (Jan-01-2021, 06:52 AM)palladium Wrote: (Jan-01-2021, 06:29 AM)SunWers Wrote: I'm thinking it's because of this part of the code with the Įasiest way to find out is to print out the dataframe and see how many columns you get. From there I was going to figure out how to import it in to the correct columns for the Cutter A - Marker Report.xlsx that I have created. csv file that I would then need to convert to a. I was thinking I needed to convert it to a. xlsx file (Cutter A - Marker Report.xlsx) that I mentioned in an earlier post. I'm trying to import this text file with specific columns into a. I'm thinking it's because of this part of the code with the df = pd.read_csv(in_filename, sep=" ")Or am I going completely wrong with what I'm thinking. Out_filename = os.path.join(save_path,'Output.csv')ĭf.to_csv(out_filename, index=False)But when I run this code it converts all columns into one In_filename = os.path.join(save_path,'mytxt.txt') Save_path = "C:/Users/vhubb/Documents/Python Scripts" I run the code below to try and convert it to. I was thinking it was a tab delimited file but when I import it in from out Gerber cutters it comes in as a text file. I think I'm missing how to import the columns. They are identifiable with a special user flair.Ī community since MaAsking a question? Describe if you are using Excel (include version and operating system!), Google Sheets, or another spreadsheet application.I'm needing a little help getting a text/tab delimited file imported in with python. Occasionally Microsoft developers will post or comment. Recent ClippyPoint Milestones !Ĭongratulations and thank you to these contributors Date Include a screenshot, use the tableit website, or use the ExcelToReddit converter (courtesy of u/tirlibibi17) to present your data. NOTE: For VBA, you can select code in your VBA window, press Tab, then copy and paste that into your post or comment. ![]() To keep Reddit from mangling your formulas and other code, display it using inline-code or put it in a code-block This will award the user a ClippyPoint and change the post's flair to solved. OPs can (and should) reply to any solutions with: Solution Verified Only text posts are accepted you can have images in Text posts.Use the appropriate flair for non-questions.Post titles must be specific to your problem. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |