Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

csv

Not able to parse a .csv file uploaded using Flask

August 11, 2022 by Magenaut

I am trying to upload a CSV file, work on it to produce results, and write back (download) a new CSV file containing the result.
I am very new to Flask and I am not able to get a “proper” csv.reader object to iterate and work upon.
Here is the code so far,

Categories Python, Q&A Tags csv, flask, python Leave a comment

load csv into 2D matrix with numpy for plotting

August 11, 2022 by Magenaut

Given this CSV file:

Categories Python, Q&A Tags arrays, csv, numpy, python, reshape Leave a comment

Convert percent string to float in pandas read_csv

August 11, 2022 by Magenaut

Is there a way to convert values like ‘34%’ directly to int or float when using read_csv in pandas? I want ‘34%’ to be directly read as 0.34

Categories Python, Q&A Tags csv, file-io, pandas, percentage, python Leave a comment

Deleting rows with Python in a CSV file

August 11, 2022 by Magenaut

All I would like to do is delete a row if it has a value of ‘0’ in the third column. An example of the data would be something like:

Categories Python, Q&A Tags csv, python Leave a comment

Remove only the commas present within the double quotes

August 10, 2022 by Magenaut

In a text file, I want to remove , (commas) and also the " (quotes) (only if the double quotes contains numbers separated by commas).

Categories Q&A, Unix & Linux Tags csv, sed, text-processing Leave a comment

Select lines from text file which have ids listed in another file

August 10, 2022 by Magenaut

I use a lot of grep awk sort in my unix shell to work with medium-sized (around 10M-100M lines) tab-separated column text files. In this respect unix shell is my spreadsheet.

Categories Q&A, Unix & Linux Tags csv, shell Leave a comment

Bash converting date in a csv file with awk or other linux tool (csvcut)

August 9, 2022 by Magenaut

2017-02-03

Categories Q&A, Unix & Linux Tags awk, csv, linux, text-processing Leave a comment

command to layout tab separated list nicely

August 9, 2022 by Magenaut

Sometimes, I’m getting as an input tab separated list, which is not quite aligned, for instance

Categories Q&A, Unix & Linux Tags command-line, csv, tabulation, text-processing Leave a comment

How to manipulate a CSV file with sed or awk?

August 9, 2022 by Magenaut

How can I do the following to a CSV file using sed or awk?

Categories Q&A, Unix & Linux Tags awk, csv, sed Leave a comment

Turning separate lines into a comma separated list with quoted entries

August 9, 2022 by Magenaut

I have the following data (a list of R packages parsed from a Rmarkdown file), that I want to turn into a list I can pass to R to install:

Categories Q&A, Unix & Linux Tags csv, linux, sed, tr Leave a comment
Older posts
Newer posts
← Previous Page1 … Page13 Page14 Page15 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress